Public Types | Public Member Functions | Static Protected Member Functions | List of all members
DataGroup< DT, G > Class Template Reference

A map of "data type" group_t (DATA or QUALITY) where the data can be retrieved using quantity keys (strings). More...

#include <Data.h>

Inheritance diagram for DataGroup< DT, G >:
Inheritance graph
[legend]
Collaboration diagram for DataGroup< DT, G >:
Collaboration graph
[legend]

Public Types

typedef DataGroup< DT, G > datagroup_t
 
typedef DT data_t
 
typedef DT::datatype_t datatype_t
 
typedef std::map< std::string, DT > map_t
 
- Public Types inherited from TreeWrapper< DT::datatype_t >
typedef DT datatype_t
 
typedef DT::tree_t tree_t
 
typedef DT::tree_iter_t tree_iter_t
 

Public Member Functions

 DataGroup (typename DT::tree_t &tree, const drain::KeySelector &slct=drain::KeySelector())
 Given a dataset subtree, like tree["dataset3"], constructs a data map of desired quantities.
 
 DataGroup (const datagroup_t &src)
 
bool has (const std::string &quantity) const
 
const data_t & getData (const std::string &quantity) const
 
const data_t & getData (const char *quantity) const
 
data_t & getData (const std::string &quantity)
 
data_t & getData (const char *quantity)
 
const data_t & getData (const drain::KeySelector &slct) const
 
data_t & create (const std::string &quantity)
 Creates (or overrides) data array for quantity and scales it. More...
 
data_t & getFirstData ()
 
const data_t & getFirstData () const
 
data_t & getLastData ()
 
const data_t & getLastData () const
 
- Public Member Functions inherited from TreeWrapper< DT::datatype_t >
const drain::VariableMapgetWhat () const
 
drain::VariableMapgetWhat ()
 
const drain::VariableMapgetWhere () const
 
drain::VariableMapgetWhere ()
 
const drain::VariableMapgetHow () const
 
drain::VariableMapgetHow ()
 
void setExcluded (bool exclude=true)
 
bool isExcluded () const
 
virtual const tree_t & getTree () const
 
virtual tree_t & getTree ()
 

Static Protected Member Functions

static const data_t & getEmpty ()
 
static DT::tree_t & init (typename DT::tree_t &t, datagroup_t &dst, const drain::KeySelector &slct=drain::KeySelector())
 Given a dataset h5 subtree, like tree["dataset3"], collects all (or desired) quantities to a data object. More...
 
static DT::tree_t & adapt (const datagroup_t &src, datagroup_t &dst)
 

Additional Inherited Members

- Protected Member Functions inherited from TreeWrapper< DT::datatype_t >
 TreeWrapper (tree_t &tree)
 
 TreeWrapper (const TreeWrapper &d)
 
const drain::VariableMapgetAttr () const
 
drain::VariableMapgetAttr ()
 
- Protected Attributes inherited from TreeWrapper< DT::datatype_t >
tree_t & tree
 General HDF5 data structure.
 

Detailed Description

template<class DT, ODIMPathElem::group_t G>
class rack::DataGroup< DT, G >

A map of "data type" group_t (DATA or QUALITY) where the data can be retrieved using quantity keys (strings).

For example, dataGroup["DBZH"] may return data located at "data2" and qualityGroup["QIND"] may return data at "quality1".

Also based on TreeWrapper, so has a tree inside...

Template Parameters
DT- data object type: PlainData<...> or Data<...>
G- the path element of children: ODIMPathElem:: DATASET, DATA, or QUALITY

Applications: see SweepSrc and ProductDst below.

Member Function Documentation

◆ create()

data_t& create ( const std::string &  quantity)
inline

Creates (or overrides) data array for quantity and scales it.

Parameters
quantity-
templateQuantity- predefined quantity the scaling of which is used in initialisation
encodingParams(optional) - parameters overriding those of template quantity

◆ init()

static DT::tree_t& init ( typename DT::tree_t &  t,
datagroup_t dst,
const drain::KeySelector slct = drain::KeySelector() 
)
inlinestaticprotected

Given a dataset h5 subtree, like tree["dataset3"], collects all (or desired) quantities to a data object.

Parameters
t- target data tree
dst- odim wrapper for the data tree
quantityRegExp- optional quantity filter, if only a subset is desired.

Accept groups of type G only


The documentation for this class was generated from the following file: