9#include "MantidNexus/DllConfig.h"
13#include <shared_mutex>
15#include <unordered_set>
48 inline std::string
const &
filename() const noexcept {
return m_filename; }
55 inline std::string
const &
extension() const noexcept {
return m_extension; }
58 std::pair<std::string, std::string>
const &
firstEntryNameType() const noexcept {
return m_firstEntryNameType; };
61 bool hasRootAttr(std::string
const &
name)
const;
72 std::map<std::string, std::string>
const &
getAllEntries() const noexcept {
return m_allEntries; }
81 bool isEntry(std::string
const &entryName, std::string
const &groupClass)
const {
82 if (isEntry(entryName)) {
83 return m_allEntries.at(entryName) == groupClass;
94 bool isEntry(std::string
const &entryName)
const;
97 bool classTypeExists(std::string
const &classType)
const;
101 bool classTypeExistsChild(
const std::string &parentPath,
const std::string &classType)
const;
106 std::string getStrData(std::string
const &address);
113 std::map<std::string, std::string> initAllEntries();
114 void loadGroups(std::map<std::string, std::string> &allEntries, std::string
const &address,
unsigned int depth,
115 const unsigned int maxDepth);
std::string const m_filename
Nexus HDF5 file name.
NexusDescriptorLazy & operator=(NexusDescriptorLazy const &nd)=delete
std::string const & filename() const noexcept
Returns a constant reference to the current file name.
~NexusDescriptorLazy()=default
Using RAII components, no need to deallocate explicitly.
std::unordered_set< std::string > m_allMisses
the set of non-existent entries that have been checked
std::pair< std::string, std::string > m_firstEntryNameType
std::string const & extension() const noexcept
Access the file extension.
std::map< std::string, std::string > const & getAllEntries() const noexcept
Returns a const reference of the internal map holding all entries in the Nexus HDF5 file.
std::shared_mutex m_readNexusMutex
mutex to protect reading from file after initialization in const methods
std::unordered_set< std::string > m_rootAttrs
Root attributes cache.
bool isEntry(std::string const &entryName, std::string const &groupClass) const
Checks if a full-address entry exists for a particular groupClass in a Nexus dataset.
NexusDescriptorLazy(NexusDescriptorLazy &&nd)=delete
NexusDescriptorLazy()=delete
std::string const m_extension
Extension.
std::pair< std::string, std::string > const & firstEntryNameType() const noexcept
Returns the name & type of the first entry in the file.
NexusDescriptorLazy(NexusDescriptorLazy const &nd)=delete
std::map< std::string, std::string > m_allEntries
All entries metadata.
UniqueID<&H5Fclose > m_fileID
HDF5 File Handle.
NexusDescriptorLazy & operator=(NexusDescriptorLazy &&nd)=delete
A wrapper class for managing HDF5 object handles (hid_t).
Helper class which provides the Collimation Length for SANS instruments.