Mantid
|
structure to hold a dae item More...
#include <item_struct.h>
Classes | |
struct | item_t |
structure to hold a dae item More... | |
Public Member Functions | |
int | addItem (const std::string &name, const T *value, bool det_average=false, const int *dim0=nullptr, const int *dim1=nullptr) |
Adds an item. More... | |
const item_t * | findItem (const std::string &item_name, bool det_average) |
finds an item More... | |
int | getArrayItem (const std::string &item_name, int nspec, T *larray) |
Gets an array of items. More... | |
int | getArrayItem (const std::string &item_name, T *larray) |
Gets an array of items. More... | |
int | getArrayItemSize (const std::string &item_name, int *dims_array, int &ndims) |
Gets the size of an array of items. More... | |
int | getItem (const std::string &item_name, const long *spec_array, int nspec, T *lVal) |
Gets an item nspec number of 0 means no spec average. More... | |
int | getItem (const std::string &item_name, T &value) |
Gets an item. More... | |
item_struct () | |
Private Types | |
using | items_map_t = std::map< std::string, item_t > |
Type def of internal map of named items. More... | |
Private Attributes | |
items_map_t | m_items |
internal map of named items More... | |
long | m_ndet |
with det_average More... | |
unsigned long * | m_spec_array |
length m_ndet; used for averaging values More... | |
structure to hold a dae item
Definition at line 15 of file item_struct.h.
|
private |
Type def of internal map of named items.
Definition at line 30 of file item_struct.h.
|
inline |
Definition at line 27 of file item_struct.h.
|
inline |
Adds an item.
name | :: the item name |
value | :: the item |
det_average | :: Detector average or not |
dim0 | :: Diemnsion array zero |
dim1 | :: Diemnsion array one |
Definition at line 45 of file item_struct.h.
References item_struct< T >::m_items, and value.
Referenced by ISISRAW::addItems().
|
inline |
finds an item
item_name | :: the item name |
det_average | :: Detector average or not |
Definition at line 61 of file item_struct.h.
References item_struct< T >::m_items.
int item_struct< T >::getArrayItem | ( | const std::string & | item_name, |
int | nspec, | ||
T * | larray | ||
) |
Gets an array of items.
item_name | :: the item name |
nspec | :: the number of spectra in the array |
larray | :: The returned array |
Definition at line 118 of file item_struct.cpp.
References item_struct< T >::item_t::dim0, item_struct< T >::item_t::dim1, FAILURE, n, SUCCESS, and item_struct< T >::item_t::value.
int item_struct< T >::getArrayItem | ( | const std::string & | item_name, |
T * | larray | ||
) |
Gets an array of items.
item_name | :: the item name |
larray | :: The returned array |
Definition at line 146 of file item_struct.cpp.
References n.
int item_struct< T >::getArrayItemSize | ( | const std::string & | item_name, |
int * | dims_array, | ||
int & | ndims | ||
) |
Gets the size of an array of items.
item_name | :: the item name |
dims_array | :: The array of dimensions |
ndims | :: the number of dimensions in the array |
Definition at line 92 of file item_struct.cpp.
References item_struct< T >::item_t::dim0, item_struct< T >::item_t::dim1, FAILURE, and SUCCESS.
int item_struct< T >::getItem | ( | const std::string & | item_name, |
const long * | spec_array, | ||
int | nspec, | ||
T * | lVal | ||
) |
Gets an item nspec number of 0 means no spec average.
item_name | :: the item name |
spec_array | :: The array of spectra numbers |
nspec | :: the number of spectra in the array |
lVal | :: A pointer to the item |
Definition at line 42 of file item_struct.cpp.
References item_struct< T >::item_t::dim0, item_struct< T >::item_t::dim1, FAILURE, n, SUCCESS, and item_struct< T >::item_t::value.
int item_struct< T >::getItem | ( | const std::string & | item_name, |
T & | value | ||
) |
Gets an item.
item_name | :: the item name |
value | :: A pointer to the item |
Definition at line 18 of file item_struct.cpp.
|
private |
internal map of named items
Definition at line 32 of file item_struct.h.
Referenced by item_struct< T >::addItem(), and item_struct< T >::findItem().
|
private |
|
private |
length m_ndet; used for averaging values
Definition at line 33 of file item_struct.h.