45 int addItem(
const std::string &name,
const T *
value,
bool det_average =
false,
const int *dim0 =
nullptr,
46 const int *dim1 =
nullptr) {
47 std::pair<typename items_map_t::iterator, bool> insert_ret;
48 insert_ret =
m_items.insert(
typename items_map_t::value_type(name,
item_t(
value, det_average, dim0, dim1)));
49 if (!insert_ret.second) {
62 typename items_map_t::const_iterator iter;
64 if ((iter !=
m_items.end()) && (iter->second.det_average == det_average)) {
65 return &(iter->second);
72 int getItem(
const std::string &item_name,
const long *spec_array,
int nspec, T *lVal);
73 int getArrayItemSize(
const std::string &item_name,
int *dims_array,
int &ndims);
74 int getArrayItem(
const std::string &item_name,
int nspec, T *larray);
75 int getArrayItem(
const std::string &item_name, T *larray);
double value
The value of the point.
structure to hold a dae item
unsigned long * m_spec_array
length m_ndet; used for averaging values
long m_ndet
with det_average
int addItem(const std::string &name, const T *value, bool det_average=false, const int *dim0=nullptr, const int *dim1=nullptr)
Adds an item.
int getArrayItem(const std::string &item_name, int nspec, T *larray)
Gets an array of items.
int getArrayItemSize(const std::string &item_name, int *dims_array, int &ndims)
Gets the size of an array of items.
const item_t * findItem(const std::string &item_name, bool det_average)
finds an item
std::map< std::string, item_t > items_map_t
Type def of internal map of named items.
items_map_t m_items
internal map of named items
int getItem(const std::string &item_name, T &value)
Gets an item.
structure to hold a dae item
const int * dim1
dimension one array
const T * value
array of type T
item_t(const T *v, bool da, const int *d0, const int *d1)
Constructor.
bool det_average
can be averaged over detectors via m_spec_array
const int * dim0
dimension zero array