Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::Nexus::NXData Class Reference

Implements NXdata Nexus class. More...

#include <NexusClasses.h>

Inheritance diagram for Mantid::Nexus::NXData:
Mantid::Nexus::NXClass Mantid::Nexus::NXObject

Public Member Functions

std::string NX_class () const override
 Nexus class id.
 
 NXData (const NXClass &parent, const std::string &name)
 Constructor.
 
template<typename T >
NXDataSetTyped< T > openData ()
 Opens the dataset within this NXData with signal=1 attribute.
 
NXDouble openDoubleData ()
 Opens data of double type.
 
NXFloat openFloatData ()
 Opens data of float type.
 
NXInt openIntData ()
 Opens data of int type.
 
- Public Member Functions inherited from Mantid::Nexus::NXClass
void close ()
 Close this class.
 
bool containsDataSet (const std::string &query) const
 Returns whether an individual dataset is present.
 
bool containsGroup (const std::string &query) const
 Returns whether an individual group (or group) is present.
 
std::vector< NXInfo > & datasets () const
 Returns a list of all datasets in this NXClass.
 
NXInfo getDataSetInfo (const std::string &name) const
 Returns NXInfo for a dataset.
 
double getDouble (const std::string &name) const
 Returns a double.
 
float getFloat (const std::string &name) const
 Returns a float.
 
int32_t getInt (const std::string &name) const
 Returns a int.
 
std::string getString (const std::string &name) const
 Returns a string.
 
std::vector< NXClassInfo > & groups () const
 Returns a list of all classes (or groups) in this NXClass.
 
bool isValid (const std::string &address) const
 Check if a address exists relative to the current class address.
 
 NXClass (NXClass const &parent, std::string const &name)
 Constructor.
 
void open ()
 Opens this NXClass using File::openGroupAddress(). Can be slow (or is slow)
 
bool openLocal (const std::string &nxclass="")
 Opens this NXClass using File::openGroup().
 
NXChar openNXChar (const std::string &name) const
 Creates and opens a char dataset.
 
template<class NX >
NX openNXClass (const std::string &name) const
 Templated method for creating derived NX classes.
 
template<class T >
NXDataSetTyped< T > openNXDataSet (const std::string &name) const
 Templated method for creating datasets.
 
NXDouble openNXDouble (const std::string &name) const
 Creates and opens a double dataset.
 
NXFloat openNXFloat (const std::string &name) const
 Creates and opens a float dataset.
 
NXClass openNXGroup (const std::string &name) const
 Creates and opens an arbitrary (non-standard) class (group).
 
NXInt openNXInt (const std::string &name) const
 Creates and opens an integer dataset.
 
NXUInt64 openNXSize (const std::string &name) const
 Creates and opens a size_t dataset.
 
- Public Member Functions inherited from Mantid::Nexus::NXObject
NexusAddress const & address () const
 Returns the absolute address to the object.
 
std::string name () const
 Returns the name of the object.
 
 NXObject (File *fileID, NXClass const *parent, std::string const &name)
 NXObject constructor.
 
 NXObject (std::shared_ptr< File > const &fileID, NXClass const *parent, std::string const &name)
 NXObject constructor.
 
virtual ~NXObject ()=default
 

Additional Inherited Members

- Public Attributes inherited from Mantid::Nexus::NXObject
std::shared_ptr< File > m_fileID
 Nexus file id.
 
- Protected Member Functions inherited from Mantid::Nexus::NXClass
void clear ()
 Deletes content of m_groups and m_datasets.
 
void readAllInfo ()
 Fills in m_groups and m_datasets.
 
- Protected Attributes inherited from Mantid::Nexus::NXClass
std::shared_ptr< std::vector< NXInfo > > m_datasets
 Holds info about the datasets in this NXClass.
 
std::shared_ptr< std::vector< NXClassInfo > > m_groups
 Holds info about the child NXClasses.
 
- Protected Attributes inherited from Mantid::Nexus::NXObject
NexusAddress m_address
 Keeps the absolute address to the object.
 
bool m_open
 Set to true if the object has been open.
 

Detailed Description

Implements NXdata Nexus class.

Definition at line 598 of file NexusClasses.h.

Constructor & Destructor Documentation

◆ NXData()

Mantid::Nexus::NXData::NXData ( const NXClass parent,
const std::string &  name 
)

Constructor.

Parameters
parent:: The parent Nexus class. In terms of HDF it is the group containing the NXClass.
name:: The name of the NXClass relative to its parent

Definition at line 401 of file NexusClasses.cpp.

Member Function Documentation

◆ NX_class()

std::string Mantid::Nexus::NXData::NX_class ( ) const
inlineoverridevirtual

Nexus class id.

Reimplemented from Mantid::Nexus::NXClass.

Definition at line 607 of file NexusClasses.h.

◆ openData()

template<typename T >
NXDataSetTyped< T > Mantid::Nexus::NXData::openData ( )
inline

Opens the dataset within this NXData with signal=1 attribute.

Definition at line 609 of file NexusClasses.h.

References Mantid::Nexus::NXDataSet::attributes, and Mantid::Nexus::NXDataSet::open().

◆ openDoubleData()

NXDouble Mantid::Nexus::NXData::openDoubleData ( )
inline

◆ openFloatData()

NXFloat Mantid::Nexus::NXData::openFloatData ( )
inline

Opens data of float type.

Definition at line 624 of file NexusClasses.h.

◆ openIntData()

NXInt Mantid::Nexus::NXData::openIntData ( )
inline

The documentation for this class was generated from the following files: