Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ProductBase Class Reference

Base class for radar data processors. Input can be in polar or Cartesian coordinates. More...

#include <ProductBase.h>

Inheritance diagram for ProductBase:
Inheritance graph
[legend]
Collaboration diagram for ProductBase:
Collaboration graph
[legend]

Public Member Functions

const std::string & getLastArguments () const
 
virtual ~ProductBase ()
 Destructor.
 
void setDataSelector (const DataSelector &selector)
 Copies the conditions of another selector.
 
const DataSelectorgetDataSelector () const
 Returns the data selector of this operator.
 
DataSelectorgetDataSelector ()
 Returns the data selector of this operator.
 
void help (std::ostream &ostr=std::cout, bool showDescription=true) const
 Dumps the help of this operator.
 
const drain::ReferenceMapgetAllowedEncoding () const
 Returns a map of encoding parameters that can be changed by the user.
 
virtual void setEncodingRequest (const std::string &p)
 Set encoding parameters for the result: type,gain,offset,undetect,nodata. More...
 
void setAllowedEncoding (const std::string &keys)
 
- Public Member Functions inherited from ProductConf
 ProductConf ()
 Default constructor.
 
 ProductConf (const ProductConf &conf)
 Copy constructor.
 
- Public Member Functions inherited from BeanLike
virtual const std::string & getName () const
 Return the name of an instance.
 
virtual const std::string & getDescription () const
 Return a brief description.
 
bool hasParameters () const
 
template<class F >
getParameter (const std::string &p) const
 Gets a single parameter.
 
const ReferenceMapgetParameters () const
 
ReferenceMapgetParameters ()
 
template<class F >
void setParametersFromEntries (const F &args)
 
void setParameters (std::initializer_list< Variable::init_pair_t > args)
 Grants access to (if above hidden)
 
virtual void setParameters (const std::string &p, char assignmentSymbol='=', char separatorSymbol=0)
 Sets comma-separated parameters in a predetermined order "a,b,c" or by specifing them "b=2". More...
 
template<class T >
void setParameters (const std::map< std::string, T > &args)
 Set parameters.
 
template<class T >
void setParameters (const SmartMap< T > &args)
 Set parameters.
 
void setParameter (const std::string &p, const Castable &value)
 Sets a single parameter.
 
template<class T >
void setParameter (const std::string &p, const VariableT< T > &value)
 
template<class F >
void setParameter (const std::string &p, const F &value)
 Sets a single parameter. More...
 
template<class F >
void setParameter (const std::string &p, std::initializer_list< F > value)
 Sets a single parameter.
 
BeanLikeoperator= (const BeanLike &b)
 
virtual std::ostream & toStream (std::ostream &ostr, bool compact=true) const
 
 BeanLike (const BeanLike &b)
 
 BeanLike (const std::string &name, const std::string &description="")
 

Static Public Member Functions

static void completeEncoding (ODIM &productODIM, const std::string &targetEncoding)
 Modifies encoding. If type is changed, resets scaling first. More...
 
static void applyODIM (ODIM &productODIM, const ODIM &srcODIM, bool applyDefaults=false)
 Sets target quantity and encoding, if unset. If input odim. More...
 
static void setRackVersion (drain::VariableMap &metadata)
 

Protected Member Functions

 ProductBase (const std::string &name, const std::string &description)
 Default constructor.
 
 ProductBase (const ProductBase &product)
 
void storeLastArguments (const std::string &p) override
 Called after setParameters()
 
- Protected Member Functions inherited from BeanLike
virtual void updateBean () const
 Called after setParameters()
 

Static Protected Member Functions

static void setODIMspecials (ODIM &productODIM)
 Sets target encoding.
 

Protected Attributes

std::string lastArguments
 
drain::ReferenceMap allowedEncoding
 Defines which encoding parameters can be changed by the user from command line. More...
 
- Protected Attributes inherited from BeanLike
const std::string name
 
const std::string description
 
ReferenceMap parameters
 

Additional Inherited Members

- Public Types inherited from ProductConf
enum  OutputDataVerbosity { DEFAULT =0 , INTERMEDIATE =1 , DEBUG =2 , QUALITY =4 }
 Determines if also intermediate results (1) are saved. See –store.
 
typedef drain::EnumFlagger< drain::MultiFlagger< OutputDataVerbosity > > OutputFlagger
 
- Public Attributes inherited from ProductConf
DataSelector dataSelector
 
std::string targetEncoding
 How the (main) output is encoded.
 
ODIMPathElem appendResults
 If set, appends outputs in an hdf5 structure instead of overwriting. More...
 
OutputFlagger outputDataVerbosity = DEFAULT
 

Detailed Description

Base class for radar data processors. Input can be in polar or Cartesian coordinates.

Input and output as HDF5 data, which has been converted to internal structure, drain::Tree<NodeH5>.

Input can be

Basically, there are two kinds of polar processing

TODO: Raise to RackOp TODO: Consider common processDataSet for all data types, see ImageOpRacklet::exec()

Template Parameters
TS- source (input) ODIM type
TD- destination (output) ODIM type

Member Function Documentation

◆ applyODIM()

void applyODIM ( ODIM productODIM,
const ODIM srcODIM,
bool  applyDefaults = false 
)
static

Sets target quantity and encoding, if unset. If input odim.

Parameters
productODIM- metadata to be modified
srcODIM- metadata applied; typically that of an product operator or input data.
applyDefaults- use default values in encoding (esp. gain), if still unset at the end of this function call.

◆ completeEncoding()

void completeEncoding ( ODIM productODIM,
const std::string &  targetEncoding 
)
static

Modifies encoding. If type is changed, resets scaling first.

TODO: Template ODIM (Set allowed encoding under construction.)

◆ setEncodingRequest()

virtual void setEncodingRequest ( const std::string &  p)
inlinevirtual

Set encoding parameters for the result: type,gain,offset,undetect,nodata.

These parameters do not change the "meteorology" of the product, but only its scaling and so on. The operator may limit the access to parameters.

Member Data Documentation

◆ allowedEncoding

drain::ReferenceMap allowedEncoding
protected

Defines which encoding parameters can be changed by the user from command line.

Regulates which parameters are visible and accessible on command line. The parameters are set in the constructor by referencing them to this->odim. The parameters are listed in help.

Assigning parameters that have not been referenced will raise an error.

See setEncoding() which carries that task.


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