|
NeXus
1
|
The Object that allows access to the information in the file. More...
#include <bindings/cpp/NeXusFile.hpp>

Public Member Functions | |
| std::pair< std::string, std::string > | getNextEntry () |
| AttrInfo | getNextAttr () |
| File (const std::string &filename, const NXaccess access=NXACC_READ) | |
| Create a new File. More... | |
| File (const char *filename, const NXaccess access=NXACC_READ) | |
| Create a new File. More... | |
| File (NXhandle handle, bool close_handle=false) | |
| Use an existing handle returned from NXopen() More... | |
| ~File () | |
| Destructor. More... | |
| void | close () |
| Close the file before the constructor is called. More... | |
| void | flush () |
| Flush the file. More... | |
| template<typename NumT > | |
| void | malloc (NumT *&data, const Info &info) |
| template<typename NumT > | |
| void | free (NumT *&data) |
| void | makeGroup (const std::string &name, const std::string &class_name, bool open_group=false) |
| Create a new group. More... | |
| void | openGroup (const std::string &name, const std::string &class_name) |
| Open an existing group. More... | |
| void | openPath (const std::string &path) |
| Open the NeXus object with the path specified. More... | |
| void | openGroupPath (const std::string &path) |
| Open the group in which the NeXus object with the specified path exists. More... | |
| std::string | getPath () |
| Get the path into the current file. More... | |
| void | closeGroup () |
| Close the currently open group. More... | |
| void | makeData (const std::string &name, NXnumtype type, const std::vector< int > &dims, bool open_data=false) |
| void | makeData (const std::string &name, NXnumtype type, const std::vector< int64_t > &dims, bool open_data=false) |
| Create a data field with the specified information. More... | |
| template<typename NumT > | |
| void | makeData (const std::string &name, const NXnumtype type, const NumT length, bool open_data=false) |
| Create a 1D data field with the specified information. More... | |
| void | writeData (const std::string &name, const std::string &value) |
| Create a 1D data field, insert the data, and close the data. More... | |
| void | writeData (const std::string &name, const char *value) |
| Create a 1D data field, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeData (const std::string &name, const std::vector< NumT > &value) |
| Create a 1D data field, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeData (const std::string &name, const NumT &value) |
| Create a 1D data field, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeData (const std::string &name, const std::vector< NumT > &value, const std::vector< int > &dims) |
| Create a n-dimension data field, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeData (const std::string &name, const std::vector< NumT > &value, const std::vector< int64_t > &dims) |
| Create a n-dimension data field, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeExtendibleData (const std::string &name, std::vector< NumT > &value) |
| Create a 1D data field with an unlimited dimension, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeExtendibleData (const std::string &name, std::vector< NumT > &value, const int64_t chunk) |
| Create a 1D data field with an unlimited dimension, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeExtendibleData (const std::string &name, std::vector< NumT > &value, std::vector< int64_t > &dims, std::vector< int64_t > &chunk) |
| Create a 1D data field with an unlimited dimension, insert the data, and close the data. More... | |
| template<typename NumT > | |
| void | writeUpdatedData (const std::string &name, std::vector< NumT > &value) |
| Updates the data written into an already-created data vector. More... | |
| template<typename NumT > | |
| void | writeUpdatedData (const std::string &name, std::vector< NumT > &value, std::vector< int64_t > &dims) |
| Updates the data written into an already-created data vector. More... | |
| void | makeCompData (const std::string &name, const NXnumtype type, const std::vector< int > &dims, const NXcompression comp, const std::vector< int > &bufsize, bool open_data=false) |
| void | makeCompData (const std::string &name, const NXnumtype type, const std::vector< int64_t > &dims, const NXcompression comp, const std::vector< int64_t > &bufsize, bool open_data=false) |
| Create a field with compression. More... | |
| template<typename NumT > | |
| void | writeCompData (const std::string &name, const std::vector< NumT > &value, const std::vector< int > &dims, const NXcompression comp, const std::vector< int > &bufsize) |
| template<typename NumT > | |
| void | writeCompData (const std::string &name, const std::vector< NumT > &value, const std::vector< int64_t > &dims, const NXcompression comp, const std::vector< int64_t > &bufsize) |
| Create a compressed data, insert the data, and close it. More... | |
| void | openData (const std::string &name) |
| void | closeData () |
| Close the currently open data. More... | |
| void | putData (const void *data) |
| template<typename NumT > | |
| void | putData (const std::vector< NumT > &data) |
| void | putAttr (const AttrInfo &info, const void *data) |
| Put the supplied data as an attribute into the currently open data. More... | |
| template<typename NumT > | |
| void | putAttr (const std::string &name, const NumT value) |
| Put the supplied data as an attribute into the currently open data. More... | |
| void | putAttr (const char *name, const char *value) |
| Put a string as an attribute in the file. More... | |
| void | putAttr (const std::string &name, const std::string value) |
| Put a string as an attribute in the file. More... | |
| void | putSlab (void *data, std::vector< int > &start, std::vector< int > &size) |
| void | putSlab (void *data, std::vector< int64_t > &start, std::vector< int64_t > &size) |
| Insert an array as part of a data in the final file. More... | |
| template<typename NumT > | |
| void | putSlab (std::vector< NumT > &data, std::vector< int > &start, std::vector< int > &size) |
| template<typename NumT > | |
| void | putSlab (std::vector< NumT > &data, std::vector< int64_t > &start, std::vector< int64_t > &size) |
| Insert an array as part of a data in the final file. More... | |
| template<typename NumT > | |
| void | putSlab (std::vector< NumT > &data, int start, int size) |
| Insert a number as part of a data in the final file. More... | |
| template<typename NumT > | |
| void | putSlab (std::vector< NumT > &data, int64_t start, int64_t size) |
| Insert a number as part of a data in the final file. More... | |
| NXlink | getDataID () |
| void | makeLink (NXlink &link) |
| Create a link in the current location to the supplied id. More... | |
| void | makeNamedLink (const std::string &name, NXlink &link) |
| Create a link with a new name. More... | |
| void | openSourceGroup () |
| Open the original copy of this group or data as declared by the "target" attribute. More... | |
| void | getData (void *data) |
| Put the currently open data in the supplied pointer. More... | |
| template<typename NumT > | |
| std::vector< NumT > * | getData () |
| Allocate memory and return the data as a vector. More... | |
| template<typename NumT > | |
| void | getData (std::vector< NumT > &data) |
| Put data into the supplied vector. More... | |
| void | getDataCoerce (std::vector< int > &data) |
| Get data and coerce into an int vector. More... | |
| void | getDataCoerce (std::vector< double > &data) |
| Get data and coerce into a vector of doubles. More... | |
| bool | isDataInt () |
| Return true if the data opened is of one of the int data types, 32 bits or less. More... | |
| template<typename NumT > | |
| void | readData (const std::string &dataName, std::vector< NumT > &data) |
| Put data into the supplied vector. More... | |
| template<typename NumT > | |
| void | readData (const std::string &dataName, NumT &data) |
| Put data into the supplied value. More... | |
| void | readData (const std::string &dataName, std::string &data) |
| Put data into the supplied string. More... | |
| std::string | getStrData () |
| Info | getInfo () |
| std::map< std::string, std::string > | getEntries () |
| Return the entries available in the current place in the file. More... | |
| void | getEntries (std::map< std::string, std::string > &result) |
| Return the entries available in the current place in the file, but avoids the map copy of getEntries(). More... | |
| void | getSlab (void *data, const std::vector< int > &start, const std::vector< int > &size) |
| void | getSlab (void *data, const std::vector< int64_t > &start, const std::vector< int64_t > &size) |
| Get a section of data from the file. More... | |
| std::vector< AttrInfo > | getAttrInfos () |
| bool | hasAttr (const std::string &name) |
| void | getAttr (const AttrInfo &info, void *data, int length=-1) |
| Get the value of the attribute specified by the AttrInfo supplied. More... | |
| template<typename NumT > | |
| NumT | getAttr (const AttrInfo &info) |
| Get the value of an attribute that is a scalar number. More... | |
| template<typename NumT > | |
| void | getAttr (const std::string &name, NumT &value) |
| Get the value of an attribute that is a scalar number. More... | |
| std::string | getStrAttr (const AttrInfo &info) |
| Get the value of a string attribute. More... | |
| NXlink | getGroupID () |
| bool | sameID (NXlink &first, NXlink &second) |
| Determine whether or not two links refer to the same data or group. More... | |
| void | printLink (NXlink &link) |
| Diagnostic print of the link information. More... | |
| void | setNumberFormat (NXnumtype &type, const std::string &format) |
| Set the number format used for a particular type when using the xml base. More... | |
| std::string | inquireFile (const int buff_length=NX_MAXPATHLEN) |
| Find out the name of the file this object is holding onto. More... | |
| std::string | isExternalGroup (const std::string &name, const std::string &type, const unsigned buff_length=NX_MAXNAMELEN) |
| Determine Whether or not a supplied group is external. More... | |
| void | linkExternal (const std::string &name, const std::string &type, const std::string &url) |
| Create a link to a group in an external file. More... | |
| bool | isDataSetOpen () |
| This function checksi if we are in an open dataset. More... | |
| TypeMap * | getTypeMap () |
| Create a multimap with the data types as keys and the associated paths as values. More... | |
| template<> | |
| void | getAttr (const std::string &name, std::string &value) |
The Object that allows access to the information in the file.
Definition at line 109 of file NeXusFile.hpp.
| NeXus::File::File | ( | const std::string & | filename, |
| const NXaccess | access = NXACC_READ |
||
| ) |
Create a new File.
| filename | The name of the file to open. |
| access | How to access the file. |
Definition at line 177 of file NeXusFile.cpp.
| NeXus::File::File | ( | const char * | filename, |
| const NXaccess | access = NXACC_READ |
||
| ) |
Create a new File.
| filename | The name of the file to open. |
| access | How to access the file. |
Definition at line 181 of file NeXusFile.cpp.
References NXopen().

| NeXus::File::File | ( | NXhandle | handle, |
| bool | close_handle = false |
||
| ) |
Use an existing handle returned from NXopen()
| handle | Handle to connect to |
| close_handle | Should the handle be closed on destruction |
Definition at line 174 of file NeXusFile.cpp.
| NeXus::File::~File | ( | ) |
Destructor.
This does close the file.
Definition at line 198 of file NeXusFile.cpp.
References NXclose().

| void NeXus::File::close | ( | ) |
Close the file before the constructor is called.
Definition at line 208 of file NeXusFile.cpp.
References NXclose().

| void NeXus::File::closeData | ( | ) |
Close the currently open data.
Definition at line 526 of file NeXusFile.cpp.
References NXclosedata().
Referenced by NeXus::Stream::operator<<(), NeXus::Stream::operator>>(), readData(), NeXus::Stream::DataHolder< NumT >::readFromFile(), NeXus::Stream::Data::readFromFile(), writeCompData(), writeData(), writeExtendibleData(), NeXus::Stream::Data::writeToFile(), and writeUpdatedData().

| void NeXus::File::closeGroup | ( | ) |
Close the currently open group.
Definition at line 297 of file NeXusFile.cpp.
References NXclosegroup().
Referenced by linkExternal(), NeXus::Stream::operator<<(), and NeXus::Stream::operator>>().

| void NeXus::File::flush | ( | ) |
Flush the file.
Definition at line 218 of file NeXusFile.cpp.
References NXflush().

| template void File::free | ( | NumT *& | data | ) |
Definition at line 1334 of file NeXusFile.cpp.
References getAttr(), getData(), makeData(), malloc(), NXDLL_EXPORT, putAttr(), putSlab(), readData(), writeCompData(), writeData(), writeExtendibleData(), and writeUpdatedData().

| void NeXus::File::getAttr | ( | const AttrInfo & | info, |
| void * | data, | ||
| int | length = -1 |
||
| ) |
Get the value of the attribute specified by the AttrInfo supplied.
| info | Designation of which attribute to read. |
| data | The pointer to put the attribute value in. |
| length | The length of the attribute. If this is "-1" then the information in the supplied AttrInfo object will be used. |
Definition at line 1064 of file NeXusFile.cpp.
References NeXus::AttrInfo::length, NeXus::AttrInfo::name, NXgetattr(), and NeXus::AttrInfo::type.
Referenced by free(), getAttr(), getStrAttr(), and NeXus::Stream::AttrHolder< NumT >::readFromFile().

| NumT NeXus::File::getAttr | ( | const AttrInfo & | info | ) |
Get the value of an attribute that is a scalar number.
| info | Designation of which attribute to read. |
| NumT | numeric data type of result |
Definition at line 1094 of file NeXusFile.cpp.
References getAttr().

| void NeXus::File::getAttr | ( | const std::string & | name, |
| NumT & | value | ||
| ) |
Get the value of an attribute that is a scalar number.
| [in] | name | Name of attribute to read |
| [out] | value | The read attribute value. |
| NumT | numeric data type of value |
Definition at line 1111 of file NeXusFile.cpp.
References NeXus::AttrInfo::length, NeXus::AttrInfo::name, and NeXus::AttrInfo::type.
| void NeXus::File::getAttr | ( | const std::string & | name, |
| std::string & | value | ||
| ) |
<
Definition at line 1101 of file NeXusFile.cpp.
References getStrAttr(), NeXus::AttrInfo::length, NeXus::AttrInfo::name, and NeXus::AttrInfo::type.

| vector< AttrInfo > NeXus::File::getAttrInfos | ( | ) |
Definition at line 1149 of file NeXusFile.cpp.
References getNextAttr(), and NeXus::AttrInfo::name.

| void NeXus::File::getData | ( | void * | data | ) |
Put the currently open data in the supplied pointer.
| data | The pointer to copy the data to. |
Definition at line 711 of file NeXusFile.cpp.
References NXgetdata().
Referenced by NeXus::Stream::DataHolder< NumT >::readFromFile().

| template vector< char > * File::getData | ( | ) |
Allocate memory and return the data as a vector.
Since this does call "new vector<NumT>" the caller is responsible for calling "delete".
| NumT | numeric data type of result |
Definition at line 722 of file NeXusFile.cpp.
References NeXus::Info::dims, getInfo(), and NeXus::Info::type.
Referenced by free(), getData(), getDataCoerce(), getStrData(), and readData().

| void NeXus::File::getData | ( | std::vector< NumT > & | data | ) |
Put data into the supplied vector.
The vector does not need to be the correct size, just the correct type as it is resized to the appropriate value.
| data | Where to put the data. |
| NumT | numeric data type of data |
Definition at line 752 of file NeXusFile.cpp.
References NeXus::Info::dims, getData(), getInfo(), and NeXus::Info::type.

| void NeXus::File::getDataCoerce | ( | std::vector< int > & | data | ) |
Get data and coerce into an int vector.
| Exception | if the data is actually a float or another type that cannot be coerced to an int. |
| data | :: vector to be filled. |
Definition at line 775 of file NeXusFile.cpp.
References getData(), getInfo(), NeXus::INT16, NeXus::INT32, NeXus::INT8, NeXus::Info::type, NeXus::UINT16, NeXus::UINT32, and NeXus::UINT8.

| void NeXus::File::getDataCoerce | ( | std::vector< double > & | data | ) |
Get data and coerce into a vector of doubles.
| Exception | if the data cannot be coerced to a double. |
| data | :: vector to be filled. |
Definition at line 820 of file NeXusFile.cpp.
References NeXus::FLOAT32, NeXus::FLOAT64, getData(), getInfo(), NeXus::INT16, NeXus::INT32, NeXus::INT8, NeXus::Info::type, NeXus::UINT16, NeXus::UINT32, and NeXus::UINT8.

| NXlink NeXus::File::getDataID | ( | ) |
Definition at line 664 of file NeXusFile.cpp.
References NXgetdataID().

| map< string, string > NeXus::File::getEntries | ( | ) |
Return the entries available in the current place in the file.
Definition at line 987 of file NeXusFile.cpp.
Referenced by linkExternal().
| void NeXus::File::getEntries | ( | std::map< std::string, std::string > & | result | ) |
Return the entries available in the current place in the file, but avoids the map copy of getEntries().
| result | The map that will be filled with the entries |
Definition at line 994 of file NeXusFile.cpp.
References getNextEntry().

| NXlink NeXus::File::getGroupID | ( | ) |
Definition at line 1179 of file NeXusFile.cpp.
References NXgetgroupID().

| Info NeXus::File::getInfo | ( | ) |
Definition at line 949 of file NeXusFile.cpp.
References NeXus::Info::dims, and NeXus::Info::type.
Referenced by getData(), getDataCoerce(), getStrData(), and isDataInt().
| AttrInfo NeXus::File::getNextAttr | ( | ) |
Definition at line 1040 of file NeXusFile.cpp.
References NeXus::AttrInfo::length, NeXus::AttrInfo::name, NXgetnextattr(), and NeXus::AttrInfo::type.
Referenced by getAttrInfos(), and hasAttr().

| pair< string, string > NeXus::File::getNextEntry | ( | ) |
Definition at line 966 of file NeXusFile.cpp.
References NXgetnextentry().
Referenced by getEntries().

| std::string NeXus::File::getPath | ( | ) |
Get the path into the current file.
Definition at line 284 of file NeXusFile.cpp.
References NXgetpath().

| void NeXus::File::getSlab | ( | void * | data, |
| const std::vector< int > & | start, | ||
| const std::vector< int > & | size | ||
| ) |
| data | The pointer to insert that data into. |
| start | The offset into the file's data block to start the read from. |
| size | The size of the block to read from the file. |
Definition at line 1011 of file NeXusFile.cpp.
| void NeXus::File::getSlab | ( | void * | data, |
| const std::vector< int64_t > & | start, | ||
| const std::vector< int64_t > & | size | ||
| ) |
Get a section of data from the file.
| data | The pointer to insert that data into. |
| start | The offset into the file's data block to start the read from. |
| size | The size of the block to read from the file. |
Definition at line 1016 of file NeXusFile.cpp.
| string NeXus::File::getStrAttr | ( | const AttrInfo & | info | ) |
Get the value of a string attribute.
| info | Which attribute to read. |
Definition at line 1121 of file NeXusFile.cpp.
References NeXus::CHAR, getAttr(), NeXus::AttrInfo::length, and NeXus::AttrInfo::type.
Referenced by getAttr().

| string NeXus::File::getStrData | ( | ) |
Definition at line 920 of file NeXusFile.cpp.
References NeXus::Info::dims, getData(), getInfo(), and NeXus::Info::type.
Referenced by readData().

| TypeMap * NeXus::File::getTypeMap | ( | ) |
Create a multimap with the data types as keys and the associated paths as values.
Definition at line 1315 of file NeXusFile.cpp.
References openPath().

| bool NeXus::File::hasAttr | ( | const std::string & | name | ) |
| name | the name of the attribute to look for. |
Definition at line 1163 of file NeXusFile.cpp.
References getNextAttr(), and NeXus::AttrInfo::name.

| string NeXus::File::inquireFile | ( | const int | buff_length = NX_MAXPATHLEN | ) |
Find out the name of the file this object is holding onto.
| buff_length | The size of the buffer to use for reading the name. |
Definition at line 1228 of file NeXusFile.cpp.
References NXinquirefile().

| bool NeXus::File::isDataInt | ( | ) |
Return true if the data opened is of one of the int data types, 32 bits or less.
Definition at line 901 of file NeXusFile.cpp.
References getInfo(), NeXus::INT16, NeXus::INT32, NeXus::INT8, NeXus::Info::type, NeXus::UINT16, NeXus::UINT32, and NeXus::UINT8.

| bool NeXus::File::isDataSetOpen | ( | ) |
This function checksi if we are in an open dataset.
Definition at line 673 of file NeXusFile.cpp.
References NXgetdataID().
Referenced by NeXus::Stream::operator<<(), and NeXus::Stream::operator>>().

| string NeXus::File::isExternalGroup | ( | const std::string & | name, |
| const std::string & | type, | ||
| const unsigned | buff_length = NX_MAXNAMELEN |
||
| ) |
Determine Whether or not a supplied group is external.
| name | The name of the group to check. |
| type | The type of the group to check. |
| buff_length | The size of the buffer to use for reading the url. |
Definition at line 1243 of file NeXusFile.cpp.
References NXisexternalgroup().

| void NeXus::File::linkExternal | ( | const std::string & | name, |
| const std::string & | type, | ||
| const std::string & | url | ||
| ) |
Create a link to a group in an external file.
| name | The name for the group in this file. |
| type | The type for the group in this file. |
| url | The url to the group in the external file. |
Definition at line 1266 of file NeXusFile.cpp.
References closeGroup(), getEntries(), NXlinkexternal(), and openGroup().

| void NeXus::File::makeCompData | ( | const std::string & | name, |
| const NXnumtype | type, | ||
| const std::vector< int > & | dims, | ||
| const NXcompression | comp, | ||
| const std::vector< int > & | bufsize, | ||
| bool | open_data = false |
||
| ) |
| name | The name of the data to create. |
| type | The primitive type for the data. |
| dims | The dimensions of the data. |
| comp | The compression algorithm to use. |
| bufsize | The size of the compression buffer to use. |
| open_data | Whether or not to open the data after creating it. |
Definition at line 446 of file NeXusFile.cpp.
Referenced by writeCompData(), and writeExtendibleData().
| void NeXus::File::makeCompData | ( | const std::string & | name, |
| const NXnumtype | type, | ||
| const std::vector< int64_t > & | dims, | ||
| const NXcompression | comp, | ||
| const std::vector< int64_t > & | bufsize, | ||
| bool | open_data = false |
||
| ) |
Create a field with compression.
| name | The name of the data to create. |
| type | The primitive type for the data. |
| dims | The dimensions of the data. |
| comp | The compression algorithm to use. |
| bufsize | The size of the compression buffer to use. |
| open_data | Whether or not to open the data after creating it. |
Definition at line 452 of file NeXusFile.cpp.
References openData().

| void NeXus::File::makeData | ( | const std::string & | name, |
| NXnumtype | type, | ||
| const std::vector< int > & | dims, | ||
| bool | open_data = false |
||
| ) |
| name | The name of the field to create (i.e. "distance"). |
| type | The primative type of the field (i.e. "NeXus::FLOAT32"). |
| dims | The dimensions of the field. |
| open_data | Whether or not to open the data after creating it. |
Definition at line 304 of file NeXusFile.cpp.
Referenced by free(), makeData(), and writeData().
| void NeXus::File::makeData | ( | const std::string & | name, |
| NXnumtype | type, | ||
| const std::vector< int64_t > & | dims, | ||
| bool | open_data = false |
||
| ) |
Create a data field with the specified information.
| name | The name of the field to create (i.e. "distance"). |
| type | The primative type of the field (i.e. "NeXus::FLOAT32"). |
| dims | The dimensions of the field. |
| open_data | Whether or not to open the data after creating it. |
Definition at line 309 of file NeXusFile.cpp.
References openData().

| void NeXus::File::makeData | ( | const std::string & | name, |
| const NXnumtype | type, | ||
| const NumT | length, | ||
| bool | open_data = false |
||
| ) |
Create a 1D data field with the specified information.
| name | The name of the field to create (i.e. "distance"). |
| type | The primative type of the field (i.e. "NeXus::FLOAT32"). |
| length | The number of elements in the field. |
| open_data | Whether or not to open the data after creating it. |
Definition at line 335 of file NeXusFile.cpp.
References makeData().

| void NeXus::File::makeGroup | ( | const std::string & | name, |
| const std::string & | class_name, | ||
| bool | open_group = false |
||
| ) |
Create a new group.
| name | The name of the group to create (i.e. "entry"). |
| class_name | The type of group to create (i.e. "NXentry"). |
| open_group | Whether or not to automatically open the group after creating it. |
Definition at line 225 of file NeXusFile.cpp.
References NXmakegroup(), and openGroup().
Referenced by NeXus::Stream::Group::writeToFile().

| void NeXus::File::makeLink | ( | NXlink & | link | ) |
Create a link in the current location to the supplied id.
| link | The object (group or data) in the file to link to. |
Definition at line 687 of file NeXusFile.cpp.
References NXmakelink().

| void NeXus::File::makeNamedLink | ( | const std::string & | name, |
| NXlink & | link | ||
| ) |
Create a link with a new name.
| name | The name of this copy of the link. |
| link | The object (group or data) in the file to link to. |
Definition at line 694 of file NeXusFile.cpp.
References NXmakenamedlink().

| template void File::malloc | ( | NumT *& | data, |
| const Info & | info | ||
| ) |
Definition at line 1324 of file NeXusFile.cpp.
References NeXus::Info::dims, and NeXus::Info::type.
Referenced by free().
| void NeXus::File::openData | ( | const std::string & | name | ) |
| name | The name of the data to open. |
Definition at line 516 of file NeXusFile.cpp.
References NXopendata().
Referenced by makeCompData(), makeData(), readData(), NeXus::Stream::DataHolder< NumT >::readFromFile(), NeXus::Stream::Data::readFromFile(), NeXus::Stream::Data::writeToFile(), and writeUpdatedData().

| void NeXus::File::openGroup | ( | const std::string & | name, |
| const std::string & | class_name | ||
| ) |
Open an existing group.
| name | The name of the group to create (i.e. "entry"). |
| class_name | The type of group to create (i.e. "NXentry"). |
Definition at line 244 of file NeXusFile.cpp.
References NXopengroup().
Referenced by linkExternal(), makeGroup(), and NeXus::Stream::Group::readFromFile().

| void NeXus::File::openGroupPath | ( | const std::string & | path | ) |
Open the group in which the NeXus object with the specified path exists.
| path | A unix like path string to a group or field. The path string is a list of group names and SDS names separated with a slash, '/' (i.e. "/entry/sample/name"). |
Definition at line 272 of file NeXusFile.cpp.
References NXopengrouppath().

| void NeXus::File::openPath | ( | const std::string & | path | ) |
Open the NeXus object with the path specified.
| path | A unix like path string to a group or field. The path string is a list of group names and SDS names separated with a slash, '/' (i.e. "/entry/sample/name"). |
Definition at line 260 of file NeXusFile.cpp.
References NXopenpath().
Referenced by getTypeMap().

| void NeXus::File::openSourceGroup | ( | ) |
Open the original copy of this group or data as declared by the "target" attribute.
Definition at line 704 of file NeXusFile.cpp.
References NXopensourcegroup().

| void NeXus::File::printLink | ( | NXlink & | link | ) |
Diagnostic print of the link information.
| link | The link to print to stdout. |
Definition at line 1193 of file NeXusFile.cpp.
References NXinitattrdir(), and NXinitgroupdir().

| void NeXus::File::putAttr | ( | const AttrInfo & | info, |
| const void * | data | ||
| ) |
Put the supplied data as an attribute into the currently open data.
| info | Description of the attribute to add. |
| data | The attribute value. |
Definition at line 551 of file NeXusFile.cpp.
References NeXus::AttrInfo::length, NeXus::AttrInfo::name, NXputattr(), and NeXus::AttrInfo::type.
Referenced by free(), putAttr(), and NeXus::Stream::AttrHolder< NumT >::writeToFile().

| void NeXus::File::putAttr | ( | const std::string & | name, |
| const NumT | value | ||
| ) |
Put the supplied data as an attribute into the currently open data.
| name | Name of the attribute to add. |
| value | The attribute value. |
| NumT | numeric data type of value |
Definition at line 570 of file NeXusFile.cpp.
References NeXus::AttrInfo::length, NeXus::AttrInfo::name, putAttr(), and NeXus::AttrInfo::type.

| void NeXus::File::putAttr | ( | const char * | name, |
| const char * | value | ||
| ) |
Put a string as an attribute in the file.
| name | Name of the attribute to add. |
| value | The attribute value. |
Definition at line 578 of file NeXusFile.cpp.
References putAttr().

| void NeXus::File::putAttr | ( | const std::string & | name, |
| const std::string | value | ||
| ) |
Put a string as an attribute in the file.
| name | Name of the attribute to add. |
| value | The attribute value. |
Definition at line 590 of file NeXusFile.cpp.
References NeXus::CHAR, NeXus::AttrInfo::length, NeXus::AttrInfo::name, putAttr(), and NeXus::AttrInfo::type.

| void NeXus::File::putData | ( | const void * | data | ) |
| data | The data to put in the file. |
Definition at line 533 of file NeXusFile.cpp.
References NXputdata().
Referenced by putData(), writeCompData(), and writeData().

| void NeXus::File::putData | ( | const std::vector< NumT > & | data | ) |
| data | The data to put in the file. |
| NumT | numeric data type of data |
Definition at line 544 of file NeXusFile.cpp.
References putData().

| void NeXus::File::putSlab | ( | void * | data, |
| std::vector< int > & | start, | ||
| std::vector< int > & | size | ||
| ) |
| data | The array to put in the file. |
| start | The starting index to insert the data. |
| size | The size of the array to put in the file. |
Definition at line 601 of file NeXusFile.cpp.
Referenced by free(), putSlab(), writeExtendibleData(), and writeUpdatedData().
| void NeXus::File::putSlab | ( | void * | data, |
| std::vector< int64_t > & | start, | ||
| std::vector< int64_t > & | size | ||
| ) |
Insert an array as part of a data in the final file.
| data | The array to put in the file. |
| start | The starting index to insert the data. |
| size | The size of the array to put in the file. |
Definition at line 607 of file NeXusFile.cpp.
| void NeXus::File::putSlab | ( | std::vector< NumT > & | data, |
| std::vector< int > & | start, | ||
| std::vector< int > & | size | ||
| ) |
| data | The array to put in the file. |
| start | The starting index to insert the data. |
| size | The size of the array to put in the file. |
| NumT | numeric data type of data |
Definition at line 634 of file NeXusFile.cpp.
References putSlab().

| void NeXus::File::putSlab | ( | std::vector< NumT > & | data, |
| std::vector< int64_t > & | start, | ||
| std::vector< int64_t > & | size | ||
| ) |
Insert an array as part of a data in the final file.
| data | The array to put in the file. |
| start | The starting index to insert the data. |
| size | The size of the array to put in the file. |
| NumT | numeric data type of data |
Definition at line 642 of file NeXusFile.cpp.
References putSlab().

| void NeXus::File::putSlab | ( | std::vector< NumT > & | data, |
| int | start, | ||
| int | size | ||
| ) |
Insert a number as part of a data in the final file.
| data | The array to put in the file. |
| start | The starting index to insert the data. |
| size | The size of the array to put in the file. |
| NumT | numeric data type of data |
Definition at line 651 of file NeXusFile.cpp.
References putSlab().

| void NeXus::File::putSlab | ( | std::vector< NumT > & | data, |
| int64_t | start, | ||
| int64_t | size | ||
| ) |
Insert a number as part of a data in the final file.
| data | The array to put in the file. |
| start | The starting index to insert the data. |
| size | The size of the array to put in the file. |
| NumT | numeric data type of data |
Definition at line 656 of file NeXusFile.cpp.
References putSlab().

| void NeXus::File::readData | ( | const std::string & | dataName, |
| std::vector< NumT > & | data | ||
| ) |
Put data into the supplied vector.
The vector does not need to be the correct size, just the correct type as it is resized to the appropriate value.
The named data object is opened, loaded, then closed.
| dataName | :: name of the data to open. |
| data | :: Where to put the data. |
| NumT | numeric data type of data |
Definition at line 876 of file NeXusFile.cpp.
References closeData(), getData(), and openData().
Referenced by free().

| void NeXus::File::readData | ( | const std::string & | dataName, |
| NumT & | data | ||
| ) |
Put data into the supplied value.
The named data object is opened, loaded, then closed.
| dataName | :: name of the data to open. |
| data | :: Where to put the data. |
| NumT | numeric data type of data |
Definition at line 884 of file NeXusFile.cpp.
References closeData(), getData(), and openData().

| void NeXus::File::readData | ( | const std::string & | dataName, |
| std::string & | data | ||
| ) |
Put data into the supplied string.
The vector does not need to be the correct size, just the correct type as it is resized to the appropriate value.
The named data object is opened, loaded, then closed.
| dataName | :: name of the data to open. |
| data | :: Where to put the data. |
Definition at line 894 of file NeXusFile.cpp.
References closeData(), getStrData(), and openData().

| bool NeXus::File::sameID | ( | NXlink & | first, |
| NXlink & | second | ||
| ) |
Determine whether or not two links refer to the same data or group.
| first | The first link information to compare. |
| second | The second link information to compare. |
Definition at line 1188 of file NeXusFile.cpp.
References NXsameID().

| void NeXus::File::setNumberFormat | ( | NXnumtype & | type, |
| const std::string & | format | ||
| ) |
Set the number format used for a particular type when using the xml base.
This is ignore in the other bases.
| type | The primitive type to set the format for. |
| format | The format to use. |
Definition at line 1214 of file NeXusFile.cpp.
References NXsetnumberformat().

| void NeXus::File::writeCompData | ( | const std::string & | name, |
| const std::vector< NumT > & | value, | ||
| const std::vector< int > & | dims, | ||
| const NXcompression | comp, | ||
| const std::vector< int > & | bufsize | ||
| ) |
| name | The name of the data to create. |
| value | The vector to put into the file. |
| dims | The dimensions of the data. |
| comp | The compression algorithm to use. |
| bufsize | The size of the compression buffer to use. |
| NumT | numeric data type of value |
Definition at line 495 of file NeXusFile.cpp.
Referenced by free().
| void NeXus::File::writeCompData | ( | const std::string & | name, |
| const std::vector< NumT > & | value, | ||
| const std::vector< int64_t > & | dims, | ||
| const NXcompression | comp, | ||
| const std::vector< int64_t > & | bufsize | ||
| ) |
Create a compressed data, insert the data, and close it.
| name | The name of the data to create. |
| value | The vector to put into the file. |
| dims | The dimensions of the data. |
| comp | The compression algorithm to use. |
| bufsize | The size of the compression buffer to use. |
| NumT | numeric data type of value |
Definition at line 502 of file NeXusFile.cpp.
References closeData(), makeCompData(), and putData().

| void NeXus::File::writeData | ( | const std::string & | name, |
| const std::string & | value | ||
| ) |
Create a 1D data field, insert the data, and close the data.
| name | The name of the field to create. |
| value | The string to put into the file. |
Definition at line 352 of file NeXusFile.cpp.
References NeXus::CHAR, closeData(), makeData(), and putData().
Referenced by free(), writeData(), and NeXus::Stream::DataHolder< NumT >::writeToFile().

| void NeXus::File::writeData | ( | const std::string & | name, |
| const char * | value | ||
| ) |
Create a 1D data field, insert the data, and close the data.
| name | The name of the field to create. |
| value | The string to put into the file. |
Definition at line 348 of file NeXusFile.cpp.
References writeData().

| void NeXus::File::writeData | ( | const std::string & | name, |
| const std::vector< NumT > & | value | ||
| ) |
Create a 1D data field, insert the data, and close the data.
| NumT | numeric data type of value |
| name | The name of the field to create. |
| value | The vector to put into the file. |
Definition at line 370 of file NeXusFile.cpp.
References writeData().

| void NeXus::File::writeData | ( | const std::string & | name, |
| const NumT & | value | ||
| ) |
Create a 1D data field, insert the data, and close the data.
| NumT | numeric data type of value |
| name | The name of the field to create. |
| value | The value to put into the file. |
Definition at line 343 of file NeXusFile.cpp.
References writeData().

| void NeXus::File::writeData | ( | const std::string & | name, |
| const std::vector< NumT > & | value, | ||
| const std::vector< int > & | dims | ||
| ) |
Create a n-dimension data field, insert the data, and close the data.
| name | The name of the field to create. |
| value | The data to put into the file. |
| dims | The dimensions of the data. |
| NumT | numeric data type of value |
Definition at line 376 of file NeXusFile.cpp.
References closeData(), makeData(), and putData().

| void NeXus::File::writeData | ( | const std::string & | name, |
| const std::vector< NumT > & | value, | ||
| const std::vector< int64_t > & | dims | ||
| ) |
Create a n-dimension data field, insert the data, and close the data.
| name | The name of the field to create. |
| value | The data to put into the file. |
| dims | The dimensions of the data. |
| NumT | numeric data type of value |
Definition at line 384 of file NeXusFile.cpp.
References closeData(), makeData(), and putData().

| void NeXus::File::writeExtendibleData | ( | const std::string & | name, |
| std::vector< NumT > & | value | ||
| ) |
Create a 1D data field with an unlimited dimension, insert the data, and close the data.
| NumT | numeric data type of value |
| name | :: The name of the field to create. |
| value | :: The vector to put into the file. |
Definition at line 393 of file NeXusFile.cpp.
Referenced by free().
| void NeXus::File::writeExtendibleData | ( | const std::string & | name, |
| std::vector< NumT > & | value, | ||
| const int64_t | chunk | ||
| ) |
Create a 1D data field with an unlimited dimension, insert the data, and close the data.
| NumT | numeric data type of value |
| name | :: The name of the field to create. |
| value | :: The vector to put into the file. |
| chunkSize | :: chunk size to use when writing |
Definition at line 400 of file NeXusFile.cpp.
References closeData(), makeCompData(), NeXus::NONE, and putSlab().

| void NeXus::File::writeExtendibleData | ( | const std::string & | name, |
| std::vector< NumT > & | value, | ||
| std::vector< int64_t > & | dims, | ||
| std::vector< int64_t > & | chunk | ||
| ) |
Create a 1D data field with an unlimited dimension, insert the data, and close the data.
| NumT | numeric data type of value |
| name | :: The name of the field to create. |
| value | :: The vector to put into the file. |
| dims | :: The dimensions of the data. |
| chunk | :: chunk size to use when writing |
Definition at line 411 of file NeXusFile.cpp.
References closeData(), makeCompData(), NeXus::NONE, and putSlab().

| void NeXus::File::writeUpdatedData | ( | const std::string & | name, |
| std::vector< NumT > & | value | ||
| ) |
Updates the data written into an already-created data vector.
If the data was created as extendible, it will be resized.
| NumT | numeric data type of value |
| name | :: The name of the field to create. |
| value | :: The vector to put into the file. |
Definition at line 428 of file NeXusFile.cpp.
References closeData(), openData(), and putSlab().
Referenced by free().

| void NeXus::File::writeUpdatedData | ( | const std::string & | name, |
| std::vector< NumT > & | value, | ||
| std::vector< int64_t > & | dims | ||
| ) |
Updates the data written into an already-created data vector.
If the data was created as extendible, it will be resized.
| NumT | numeric data type of value |
| name | :: The name of the field to create. |
| value | :: The vector to put into the file. |
| dims | :: The dimensions of the data. |
Definition at line 436 of file NeXusFile.cpp.
References closeData(), openData(), and putSlab().

1.8.11