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. More... | |
std::string | NX_class () const override |
Return the NX class for a class (HDF group) or "SDS" for a data set;. More... | |
NXRoot (std::string fname) | |
Constructor. More... | |
NXRoot (std::string fname, const std::string &entry) | |
Constructor. More... | |
NXEntry | openEntry (const std::string &name) |
Opens an entry – a topmost Nexus class. More... | |
NXEntry | openFirstEntry () |
Open the first NXentry in the file. More... | |
~NXRoot () override | |
Destructor. More... | |
Public Member Functions inherited from Mantid::NeXus::NXClass | |
void | close () |
Close this class. More... | |
bool | containsDataSet (const std::string &query) const |
Returns whether an individual dataset is present. More... | |
bool | containsGroup (const std::string &query) const |
Returns whether an individual group (or group) is present. More... | |
std::vector< NXInfo > & | datasets () const |
Returns a list of all datasets in this NXClass. More... | |
NXInfo | getDataSetInfo (const std::string &name) const |
Returns NXInfo for a dataset. More... | |
double | getDouble (const std::string &name) const |
Returns a double. More... | |
float | getFloat (const std::string &name) const |
Returns a float. More... | |
int | getInt (const std::string &name) const |
Returns a int. More... | |
NXClassInfo | getNextEntry () |
Returns the class information about the next entry (class or dataset) in this class. More... | |
std::string | getString (const std::string &name) const |
Returns a string. More... | |
std::vector< NXClassInfo > & | groups () const |
Returns a list of all classes (or groups) in this NXClass. More... | |
bool | isValid (const std::string &path) const |
Check if a path exists relative to the current class path. More... | |
std::string | NX_class () const override |
The NX class identifier. More... | |
NXClass (const NXClass &parent, const std::string &name) | |
Constructor. More... | |
void | open () |
Opens this NXClass using NXopengrouppath. Can be slow (or is slow) More... | |
bool | openLocal (const std::string &nxclass="") |
Opens this NXClass using NXopengroup. More... | |
NXChar | openNXChar (const std::string &name) const |
Creates and opens a char dataset. More... | |
template<class NX > | |
NX | openNXClass (const std::string &name) const |
Templated method for creating derived NX classes. More... | |
template<class T > | |
NXDataSetTyped< T > | openNXDataSet (const std::string &name) const |
Templated method for creating datasets. More... | |
NXDouble | openNXDouble (const std::string &name) const |
Creates and opens a double dataset. More... | |
NXFloat | openNXFloat (const std::string &name) const |
Creates and opens a float dataset. More... | |
NXClass | openNXGroup (const std::string &name) const |
Creates and opens an arbitrary (non-standard) class (group). More... | |
NXInt | openNXInt (const std::string &name) const |
Creates and opens an integer dataset. More... | |
NXSize | openNXSize (const std::string &name) const |
Creates and opens a size_t dataset. More... | |
void | reset () |
Creates a new object in the NeXus file at path path. More... | |
Public Member Functions inherited from Mantid::NeXus::NXObject | |
std::string | name () const |
Returns the name of the object. More... | |
virtual std::string | NX_class () const =0 |
Return the NX class name for a class (HDF group) or "SDS" for a data set;. More... | |
NXObject (const NXhandle fileID, const NXClass *parent, const std::string &name) | |
NXObject constructor. More... | |
std::string | path () const |
Returns the absolute path to the object. More... | |
virtual | ~NXObject ()=default |
Private Attributes | |
const std::string | m_filename |
The file name. More... | |
Additional Inherited Members | |
Public Attributes inherited from Mantid::NeXus::NXObject | |
NXAttributes | attributes |
Attributes. More... | |
NXhandle | m_fileID |
Nexus file id. More... | |
Protected Member Functions inherited from Mantid::NeXus::NXClass | |
void | clear () |
Deletes content of m_groups and m_datasets. More... | |
void | readAllInfo () |
Fills in m_groups and m_datasets. More... | |
Protected Attributes inherited from Mantid::NeXus::NXClass | |
std::shared_ptr< std::vector< NXInfo > > | m_datasets |
Holds info about the datasets in this NXClass. More... | |
std::shared_ptr< std::vector< NXClassInfo > > | m_groups |
Holds info about the child NXClasses. More... | |
Protected Attributes inherited from Mantid::NeXus::NXObject | |
bool | m_open |
Set to true if the object has been open. More... | |
std::string | m_path |
Keeps the absolute path to the object. More... | |
Implements NXroot Nexus class.
Definition at line 922 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 379 of file NexusClasses.cpp.
References Mantid::NeXus::NXObject::m_fileID, m_filename, 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 394 of file NexusClasses.cpp.
References Mantid::NeXus::NXObject::m_fileID, and m_filename.
|
override |
Destructor.
Definition at line 403 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 405 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 931 of file NexusClasses.h.
|
inline |
Opens an entry – a topmost Nexus class.
name | :: The name of the entry |
Definition at line 939 of file NexusClasses.h.
Referenced by Mantid::DataHandling::LoadMuonNexus2::doExec(), Mantid::DataHandling::LoadISISNexus2::exec(), Mantid::DataHandling::LoadMuonNexus1::exec(), Mantid::DataHandling::LoadNexus::exec(), Mantid::DataHandling::LoadMuonNexusV2::execLoader(), Mantid::DataHandling::LoadILLPolarizedDiffraction::loadData(), Mantid::DataHandling::LoadMuonNexus1::loadDeadTimes(), Mantid::DataHandling::LoadMuonNexus1::loadDetectorGrouping(), Mantid::DataHandling::LoadMuonNexus2::loadDetectorMapping(), Mantid::DataHandling::LoadNexusProcessed::loadEntry(), Mantid::DataHandling::LoadMuonNexus1::loadRunDetails(), Mantid::DataHandling::LoadMuonNexus2::loadRunDetails(), Mantid::DataHandling::LoadNexusProcessed::loadWorkspaceName(), openFirstEntry(), and Mantid::DataHandling::whichNexusType().
NXEntry Mantid::NeXus::NXRoot::openFirstEntry | ( | ) |
Open the first NXentry in the file.
Definition at line 410 of file NexusClasses.cpp.
References 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::LoadILLTOF2::exec(), Mantid::DataHandling::LoadLLB::exec(), Mantid::DataHandling::LoadMLZ::exec(), Mantid::DataHandling::LoadPLN::exec(), Mantid::DataHandling::LoadQKK::exec(), Mantid::DataHandling::LoadSINQFocus::exec(), Mantid::DataHandling::PatchBBY::exec(), Mantid::DataHandling::LoadILLDiffraction::loadDataScan(), Mantid::DataHandling::LoadEMU< FD >::loadEnvironParameters(), Mantid::DataHandling::LoadPLN::loadEnvironParameters(), Mantid::DataHandling::LoadEMU< FD >::loadParameters(), and Mantid::DataHandling::LoadPLN::loadParameters().
|
private |