Skip to content

Commit

Permalink
Deprecate LoadDspacemap - Sibling (#38020)
Browse files Browse the repository at this point in the history
* Deprecate and add note

* Rename release note

* Remove CppCheck suppression

* Correct date

Co-authored-by: Pete Peterson <[email protected]>

---------

Co-authored-by: Pete Peterson <[email protected]>
  • Loading branch information
ktactac-ornl and peterfpeterson authored Sep 18, 2024
1 parent 1a96441 commit b157e07
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include "MantidAPI/Algorithm.h"
#include "MantidAPI/DeprecatedAlgorithm.h"
#include "MantidAPI/MatrixWorkspace_fwd.h"
#include "MantidDataHandling/DllConfig.h"
#include "MantidDataObjects/OffsetsWorkspace.h"
Expand All @@ -22,8 +23,10 @@ namespace DataHandling {
* @author Janik Zikovsky (code from Vickie Lynch)
* @date 2011-05-10
*/
class MANTID_DATAHANDLING_DLL LoadDspacemap final : public API::Algorithm {
class MANTID_DATAHANDLING_DLL LoadDspacemap final : public API::Algorithm, public API::DeprecatedAlgorithm {
public:
LoadDspacemap();

/// Algorithm's name for identification
const std::string name() const override { return "LoadDspacemap"; };
/// Summary of algorithms purpose
Expand Down
4 changes: 3 additions & 1 deletion Framework/DataHandling/src/LoadDspacemap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ namespace Mantid::DataHandling {
// Register the algorithm into the AlgorithmFactory
DECLARE_ALGORITHM(LoadDspacemap)

LoadDspacemap::LoadDspacemap() { this->deprecatedDate("2024-09-17"); }

//----------------------------------------------------------------------------------------------
/** Initialize the algorithm's properties.
*/
Expand Down Expand Up @@ -339,7 +341,7 @@ struct VulcanCorrectionFactor {
void LoadDspacemap::readVulcanBinaryFile(const std::string &fileName, std::map<detid_t, double> &vulcan) {
BinaryFile<VulcanCorrectionFactor> file(fileName);
std::vector<VulcanCorrectionFactor> results = file.loadAll();
for (auto &result : results) {
for (const auto &result : results) {
vulcan[static_cast<detid_t>(result.pixelID)] = result.factor;
}
}
Expand Down
1 change: 0 additions & 1 deletion buildconfig/CMake/CppCheck_Suppressions.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,6 @@ duplicateConditionalAssign:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadCa
constParameterPointer:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadCalFile.cpp:57
uselessOverride:${CMAKE_SOURCE_DIR}/Framework/DataHandling/inc/MantidDataHandling/LoadDNSEvent.h:44
passedByValue:${CMAKE_SOURCE_DIR}/Framework/DataHandling/inc/MantidDataHandling/BitStream.h:30
constVariableReference:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadDspacemap.cpp:342
cstyleCast:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadANSTOHelper.cpp:210
variableScope:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/DetermineChunking.cpp:163
unreadVariable:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadANSTOHelper.cpp:436
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- :ref:`LoadDspacemap <algm-LoadDspacemap>` has been deprecated.

0 comments on commit b157e07

Please sign in to comment.