Mantid
Loading...
Searching...
No Matches
Framework
DataHandling
src
LoadSingleMesh.cpp
Go to the documentation of this file.
1
// Mantid Repository : https://github.com/mantidproject/mantid
2
//
3
// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
4
// NScD Oak Ridge National Laboratory, European Spallation Source,
5
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
// SPDX - License - Identifier: GPL - 3.0 +
7
#include "
MantidDataHandling/LoadSingleMesh.h
"
8
9
namespace
Mantid::DataHandling
{
10
11
LoadSingleMesh::LoadSingleMesh
(std::string filename, std::ios_base::openmode mode,
ScaleUnits
scaleType)
12
:
MeshFileIO
(scaleType), m_filename(
std
::move(filename)), m_file(
std
::ifstream(m_filename.c_str(), mode)) {
13
if
(!
m_file
) {
14
g_log
.
error
(
"Unable to open file: "
+
m_filename
);
15
throw
Kernel::Exception::FileError
(
"Unable to open file: "
,
m_filename
);
16
}
17
}
18
19
LoadSingleMesh::~LoadSingleMesh
() {
m_file
.close(); }
20
21
}
// namespace Mantid::DataHandling
LoadSingleMesh.h
Mantid::DataHandling::LoadSingleMesh::LoadSingleMesh
LoadSingleMesh(std::string filename, std::ios_base::openmode mode, ScaleUnits scaleType)
Definition:
LoadSingleMesh.cpp:11
Mantid::DataHandling::LoadSingleMesh::m_filename
const std::string m_filename
Definition:
LoadSingleMesh.h:30
Mantid::DataHandling::LoadSingleMesh::m_file
std::ifstream m_file
Definition:
LoadSingleMesh.h:31
Mantid::DataHandling::LoadSingleMesh::~LoadSingleMesh
virtual ~LoadSingleMesh()
Definition:
LoadSingleMesh.cpp:19
Mantid::DataHandling::MeshFileIO
Definition:
MeshFileIO.h:23
Mantid::Kernel::Exception::FileError
Records the filename and the description of failure.
Definition:
Exception.h:98
Mantid::Kernel::Logger::error
void error(const std::string &msg)
Logs at error level.
Definition:
Logger.cpp:77
Mantid::API::g_log
Kernel::Logger g_log("ExperimentInfo")
static logger object
Mantid::DataHandling
Definition:
ApplyDiffCal.h:16
Mantid::DataHandling::ScaleUnits
ScaleUnits
Definition:
MeshFileIO.h:21
std
STL namespace.
Generated on Tue Jan 3 2023 11:57:43 for Mantid by
1.9.5