Public Member Functions | Protected Types | Protected Member Functions | List of all members
CmdInputFile Class Reference

Input HDF5, PNG or text file. More...

#include <fileio-read.h>

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

Public Member Functions

void exec () const
 Run the command with current parameter values.
 
- Public Member Functions inherited from SimpleCommand< std::string >
 SimpleCommand (const std::string &name, const std::string &description, const std::string &key="value", const std::string &initValue=std::string(), const std::string &unit="")
 
 SimpleCommand (const std::string &name, const std::string &description, const std::string &key, std::initializer_list< S > l, const std::string &unit="")
 Constuctor designer for SimpleCommand<Unituple<> > .
 
 SimpleCommand (const SimpleCommand &cmd)
 
- Public Member Functions inherited from BasicCommand
 BasicCommand (const std::string &name, const std::string &description)
 
 BasicCommand (const BasicCommand &cmd)
 
- Public Member Functions inherited from BeanCommand< BeanLike >
 BeanCommand (const std::string &name, const std::string &description)
 
 BeanCommand (const BeanCommand &cmd)
 
 BeanCommand (BeanLike &b)
 
virtual const bean_tgetBean () const
 
virtual bean_tgetBean ()
 
const std::string & getName () const final
 
const std::string & getDescription () const final
 
virtual const drain::ReferenceMapgetParameters () const final
 
- Public Member Functions inherited from Command
 Command (const Command &cmd)
 
virtual void setParameters (const std::string &args) final
 
template<class T >
void setParameters (const SmartMap< T > &args)
 
template<class T >
void setParameter (const std::string &key, const T &value)
 Set a value to a single parameter. More...
 
CommandaddSection (drain::Flagger::ivalue_t i)
 
virtual void update ()
 Optional method for preparing command to execution. More...
 
bool hasParameters () const
 
virtual const std::string & getType () const
 Description of result, comparable to a return type of a function. ?
 
virtual void run (const std::string &params="")
 Convenience. Sets parameters and executes the command. More...
 
const std::string & getLastParameters () const
 After executing this command run a routine, if defined. More...
 
- Public Member Functions inherited from Contextual
 Contextual ()
 Sets internal contextPtr to NULL.
 
 Contextual (const Contextual &src)
 Copies base context (even null) of the source. Notice that the actual instance may be of derived class.
 
 Contextual (Context &ctx)
 Copies internal contextPtr.
 
template<class C >
void setContext ()
 Sets internal contextPtr to the static source.
 
void setExternalContext (Context &ctx)
 Sets internal contextPtr to outside target.
 
bool contextIsSet () const
 True, if contextPtr has been set.
 
template<class T = Context>
T & getContext () const
 If context has been set, returns it through a cast to base class Context. More...
 

Protected Types

typedef std::map< std::string, ODIMPathElemquantity_map
 

Protected Member Functions

void readFileH5 (const std::string &fullFilename) const
 Reads hdf5 file and appends it to H5 structure. Works only with sweeps (SCAN), volume (PVOL) or Cartesian data (COMP) (having elevations).
 
void appendCartesianH5 (Hi5Tree &tmpSrc, Hi5Tree &dst) const
 
void attachCartesianH5 (Hi5Tree &srcRoot, Hi5Tree &dstRoot) const
 
void appendPolarH5 (Hi5Tree &tmpSrc, Hi5Tree &dst) const
 Add DATASET groups of srcRoot to dstRoot. More...
 
void updateData (Hi5Tree &srcData, const std::string &srcKey, Hi5Tree &dstDataSet, const quantity_map &dstQuantityElems) const
 
void updateQuality (Hi5Tree &srcData, Hi5Tree &dstData) const
 
void readTextFile (const std::string &fullFilename) const
 
void readImageFile (const std::string &fullFilename) const
 
template<class OD >
void deriveImageODIM (const drain::image::Image &srcImage, OD &odim) const
 
- Protected Member Functions inherited from BeanCommand< BeanLike >
virtual drain::ReferenceMapgetParameters () final
 

Additional Inherited Members

- Public Types inherited from BeanCommand< BeanLike >
typedef BeanLike bean_t
 
- Static Public Member Functions inherited from Contextual
template<class T >
static Cloner< Context, T > & getCloner ()
 
- Public Attributes inherited from SimpleCommand< std::string >
std::string value
 
- Public Attributes inherited from BeanCommand< BeanLike >
BeanLike bean
 
- Public Attributes inherited from Command
int section = 1
 
- Static Public Attributes inherited from Command
static const SprinterLayout cmdArgLayout = {",", "?", "=", ""}
 
- Protected Attributes inherited from Command
std::string lastParameters
 
- Protected Attributes inherited from Contextual
ContextcontextPtr
 

Detailed Description

Input HDF5, PNG or text file.

In Rack, this command is also the default option, hence plain argument will be treated as files to read.

See also
rack::CmdInputPrefix
rack::CmdInputSelect

Member Function Documentation

◆ appendPolarH5()

void appendPolarH5 ( Hi5Tree &  srcRoot,
Hi5Tree &  dstRoot 
) const
protected

Add DATASET groups of srcRoot to dstRoot.

Specialized to polar measurement data: time stamps identify the dataset groups. Note: also DataSelector applied.

◆ attachCartesianH5()

void attachCartesianH5 ( Hi5Tree &  srcRoot,
Hi5Tree &  dstRoot 
) const
protected

TODO: New-iter

◆ readImageFile()

void readImageFile ( const std::string &  fullFilename) const
protected

Search last dataset

Search new data[n] in the dataset found


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