9#include "MantidNexus/DllConfig.h"
14#include <unordered_set>
49 const std::string &filename() const noexcept;
56 inline const
std::
string &extension()
const {
return m_extension; }
59 const std::pair<std::string, std::string> &
firstEntryNameType()
const {
return m_firstEntryNameType; };
62 bool hasRootAttr(
const std::string &
name)
const;
74 const std::map<std::string, std::set<std::string>> &
getAllEntries() const noexcept {
return m_allEntries; }
83 bool isEntry(
const std::string &entryName,
const std::string &groupClass)
const noexcept;
90 bool isEntry(
const std::string &entryName)
const noexcept;
98 auto it = m_allEntries.find(type);
99 if (it != m_allEntries.cend()) {
102 return std::set<std::string>();
111 std::map<std::string, std::string> allAddressesAtLevel(
const std::string &level)
const;
114 bool classTypeExists(
const std::string &classType)
const;
120 std::string classTypeForName(std::string
const &
name)
const;
129 void addEntry(
const std::string &entryName,
const std::string &groupClass);
131 void addRootAttr(
const std::string &
name);
138 std::map<std::string, std::set<std::string>> initAllEntries();
NXaccess
Nexus file access codes.
std::set< std::string > allAddressesOfType(const std::string &type) const
const std::map< std::string, std::set< std::string > > & getAllEntries() const noexcept
Returns a const reference of the internal map holding all entries in the Nexus HDF5 file.
NexusDescriptor(NexusDescriptor const &nd)=default
std::pair< std::string, std::string > m_firstEntryNameType
First entry name/type.
const std::pair< std::string, std::string > & firstEntryNameType() const
Returns the name & type of the first entry in the file.
~NexusDescriptor()=default
Using RAII components, no need to deallocate explicitly.
std::string m_filename
Nexus HDF5 file name.
std::string m_extension
Extension.
NexusDescriptor & operator=(NexusDescriptor const &nd)=default
std::unordered_set< std::string > m_rootAttrs
Root attributes.
std::map< std::string, std::set< std::string > > m_allEntries
All entries metadata.
Helper class which provides the Collimation Length for SANS instruments.