19#pragma warning(push, 0)
21#include <nexus/NeXusFile.hpp>
53 file = std::make_unique<::NeXus::File>(
filename, NXACC_CREATE5);
54 file->makeGroup(
"test_entry",
"NXentry",
true);
61 throw std::runtime_error(
"NexusTestHelper: you must call createFile() before reopenFile().");
63 file = std::make_unique<::NeXus::File>(
filename, NXACC_READ);
64 file->openGroup(
"test_entry",
"NXentry");
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
void reopenFile()
Close the newly created file and re-open it for reading back.
bool deleteFile
Do you delete when finished?
virtual ~NexusTestHelper()
Destructor.
NexusTestHelper(bool deleteFile=true)
structor.
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)