Skip to content

Commit

Permalink
Merge pull request mantidproject#37257 from robertapplin/37256-field-…
Browse files Browse the repository at this point in the history
…not-case-sensitive

Muon field orientation make case-insensitive
  • Loading branch information
SilkeSchomann committed May 2, 2024
2 parents 59da4f1 + 83357d0 commit b9f12e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Framework/DataHandling/src/LoadMuonNexusV2NexusHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "MantidDataObjects/Workspace2D.h"

#include <algorithm>
#include <cctype>

namespace {
template <typename type> std::string convertVectorToString(const std::vector<type> &vector) {
Expand Down Expand Up @@ -120,7 +121,7 @@ std::string LoadMuonNexusV2NexusHelper::loadMainFieldDirectionFromNexus() {
NXChar orientation = m_entry.openNXChar(NeXusEntry::ORIENTATON);
// some files have no data there
orientation.load();
if (orientation[0] == 't') {
if (std::tolower(orientation[0]) == 't') {
mainFieldDirection = "Transverse";
}
} catch (std::runtime_error &) {
Expand Down

0 comments on commit b9f12e0

Please sign in to comment.