Mantid
Loading...
Searching...
No Matches
NexusTestHelper.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2011 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/*********************************************************************************
8 * PLEASE READ THIS!!!!!!!
9 *
10 * This file MAY NOT be modified to use anything from a package other than
11 *Kernel.
12 *********************************************************************************/
13#pragma once
14
15#include <memory>
16#include <string>
17
18namespace NeXus {
19class File;
20}
21
27public:
28 NexusTestHelper(bool deleteFile = true);
29 virtual ~NexusTestHelper();
30
31 void createFile(const std::string &barefilename);
32 void reopenFile();
33
35 std::unique_ptr<::NeXus::File> file;
36
38 std::string filename;
39
42};
A Helper class for easily writing nexus saving/loading tests.
void reopenFile()
Close the newly created file and re-open it for reading back.
bool deleteFile
Do you delete when finished?
virtual ~NexusTestHelper()
Destructor.
void createFile(const std::string &barefilename)
Creates a NXS file with an entry, for use in a test.
std::unique_ptr<::NeXus::File > file
Nexus file handle.
std::string filename
Created filename (full path)