# MI - Fimex: MetNoFimex::CDMQualityExtractor Class Reference

# MetNoFimex::CDMQualityExtractor Class Reference

Extract data with defined quality status. More...

`#include <CDMQualityExtractor.h>`

Inheritance diagram for MetNoFimex::CDMQualityExtractor:

List of all members.

## Public Member Functions

| CDMQualityExtractor (boost::shared_ptr< CDMReader > dataReader, std::string autoConfString="", std::string configFile="") throw (CDMException)
virtual | ~CDMQualityExtractor ()
virtual boost::shared_ptr< Data > | getDataSlice (const std::string &varName, size_t unLimDimPos=0) throw (CDMException)
const std::map< std::string, std::string > | getStatusVariable () const
const std::map< std::string, std::string > | getVariableFlags () const
const std::map< std::string, std::vector< double > > | getVariableValues () const

## Detailed Description

Extract data with defined quality status.

The CDMQualityExtractor will select data from data-sources matching only configurable quality constraints. Data not matching these constraints will be set to undefined.

The configuration works either semi-automatic by interpreting the quality flags as given in CF-1.x at http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.4/cf-conventions.html#flags or by using a configuration-file describing the quality-relations between the different varibles.

All variables with no quality-configuration will not be changed.

Warning:
  The CDMQualityExtractor will read the status-variable after applying eventual quality-flags to them. It is therefore the task of the writer of the configuration, that no circular quality-flags exist.

## Constructor & Destructor Documentation

MetNoFimex::CDMQualityExtractor::CDMQualityExtractor | ( | boost::shared_ptr< CDMReader > | dataReader,
|  | std::string | autoConfString = `""`,
|  | std::string | configFile = `""` |
| ) |  |  | throw (CDMException)

Initialize the CDMQualityExtractor

Parameters:

  | dataReader | the data-source
  | autoConfString | the default value for CF-1.4 compatible status_flags, i.e. "all, highest, lowest, values=0,1,...,3", the values here might be overwritten by the config-file. If empty, no quality extraction on the basis of CF-1.4 will be used.
  | configFile | filename of a cdmQualityConfig.xml file. If empty, no quality-file will be used.

virtual MetNoFimex::CDMQualityExtractor::~CDMQualityExtractor | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

virtual boost::shared_ptr<Data> MetNoFimex::CDMQualityExtractor::getDataSlice | ( | const std::string & | varName,
|  | size_t | unLimDimPos = `0` |
| ) |  |  | throw (CDMException)`[virtual]`

Read and manipulate the data

const std::map<std::string, std::string> MetNoFimex::CDMQualityExtractor::getStatusVariable | ( |  | ) | const`[inline]`

Read the internals of statusVariable. This code is mainly thought for testing/debugging.

const std::map<std::string, std::string> MetNoFimex::CDMQualityExtractor::getVariableFlags | ( |  | ) | const`[inline]`

Read the internals of variableFlags, for testing/debugging.

const std::map<std::string, std::vector<double> > MetNoFimex::CDMQualityExtractor::getVariableValues | ( |  | ) | const`[inline]`

Read the internals of variableValues, for testing/debugging.

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

- include/fimex/CDMQualityExtractor.h