|
Mantid
|
Implements NXroot Nexus class. More...
#include <NexusClasses.h>
Public Member Functions | |
| bool | isStandard () const |
| True if complies with our understanding of the www.nexusformat.org definition. | |
| std::string | NX_class () const override |
| Return the NX class for a class (HDF group) or "SDS" for a data set;. | |
| NXRoot (std::string fname) | |
| Constructor. | |
| NXRoot (std::string fname, const std::string &entry) | |
| Constructor. | |
| NXEntry | openEntry (const std::string &name) |
| Opens an entry – a topmost Nexus class. | |
| NXEntry | openFirstEntry () |
| Open the first NXentry in the file. | |
| ~NXRoot () override | |
| Destructor. | |
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 |
Private Attributes | |
| const std::string | m_filename |
| The file name. | |
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. | |
Implements NXroot Nexus class.
Definition at line 693 of file NexusClasses.h.
| Mantid::Nexus::NXRoot::NXRoot | ( | std::string | fname | ) |
Constructor.
On creation opens the Nexus file for reading only.
| fname | :: The file name to open |
Definition at line 264 of file NexusClasses.cpp.
References Mantid::Nexus::NXObject::m_fileID, m_filename, READ, and Mantid::Nexus::NXClass::readAllInfo().
| Mantid::Nexus::NXRoot::NXRoot | ( | std::string | fname, |
| const std::string & | entry | ||
| ) |
Constructor.
Creates a new Nexus file. The first root entry will be also created.
| fname | :: The file name to create |
| entry | :: The name of the first entry in the new file |
Definition at line 280 of file NexusClasses.cpp.
References CREATE5, Mantid::Nexus::NXObject::m_fileID, m_filename, and UNUSED_ARG.
|
override |
Destructor.
Definition at line 286 of file NexusClasses.cpp.
References Mantid::Nexus::NXObject::m_fileID.
| bool Mantid::Nexus::NXRoot::isStandard | ( | ) | const |
True if complies with our understanding of the www.nexusformat.org definition.
Definition at line 294 of file NexusClasses.cpp.
|
inlineoverridevirtual |
Return the NX class for a class (HDF group) or "SDS" for a data set;.
Reimplemented from Mantid::Nexus::NXClass.
Definition at line 702 of file NexusClasses.h.
|
inline |
Opens an entry – a topmost Nexus class.
| name | :: The name of the entry |
Definition at line 711 of file NexusClasses.h.
References name.
Referenced by Mantid::DataHandling::LoadISISNexus2::exec(), Mantid::DataHandling::LoadMuonNexusV2::execLoader(), Mantid::DataHandling::LoadILLPolarizedDiffraction::loadData(), Mantid::DataHandling::LoadNexusProcessed::loadEntry(), Mantid::DataHandling::LoadNexusProcessed::loadWorkspaceName(), and openFirstEntry().
| NXEntry Mantid::Nexus::NXRoot::openFirstEntry | ( | ) |
Open the first NXentry in the file.
Definition at line 299 of file NexusClasses.cpp.
References group, Mantid::Nexus::NXClass::groups(), and openEntry().
Referenced by Mantid::DataHandling::LoadBBY::createInstrument(), Mantid::DataHandling::LoadEMUHdf::exec(), Mantid::DataHandling::LoadILLIndirect2::exec(), Mantid::DataHandling::LoadILLReflectometry::exec(), Mantid::DataHandling::LoadILLSANS::exec(), Mantid::DataHandling::LoadILLTOF3::exec(), Mantid::DataHandling::LoadMLZ::exec(), Mantid::DataHandling::LoadPLN::exec(), Mantid::DataHandling::LoadQKK::exec(), Mantid::DataHandling::LoadSINQFocus::exec(), Mantid::DataHandling::PatchBBY::exec(), Mantid::DataHandling::LoadBBY2::execLoader(), Mantid::DataHandling::LoadILLDiffraction::loadDataScan(), Mantid::DataHandling::LoadEMU< FD >::loadEnvironParameters(), Mantid::DataHandling::LoadPLN::loadEnvironParameters(), Mantid::DataHandling::LoadEMU< FD >::loadParameters(), and Mantid::DataHandling::LoadPLN::loadParameters().
|
private |