33#define H5_USE_18_API_DEFAULT 1
46#include <drain/image/Image.h>
47#include <drain/util/FileInfo.h>
48#include <drain/util/TreeOrdered.h>
50#include "data/ODIMPath.h"
84 return (image.isEmpty() && attributes.empty());
98 void writeText(std::ostream & ostr,
const std::string & prefix)
const;
122 typedef std::map<std::string, rack::ODIMPathElem>
lookup_t;
132typedef drain::OrderedTree<hi5::NodeHi5, false, rack::ODIMPath> Hi5Tree;
147bool Hi5Tree::empty()
const {
148 return ((data.empty() && !hasChildren()) || data.exclude);
174 void handleStatus(herr_t status,
const std::string & message,
drain::Logger &mout,
int lineNo=0);
176 template <
int L,
class T>
179 void handleStatus(
drain::Logger &mout, herr_t status,
const std::string & message,
const T & arg,
int lineNo=0){
184 mout.
start<L>() << message <<
": " << arg;
186 mout <<
", line=" << lineNo;
187 mout <<
", status=" << status << mout.endl;
207 hid_t getH5StringVariableLength();
217 void linkPalette(
const Hi5Tree & palette, Hi5Tree & dst);
222 bool isExcluded(
const Hi5Tree &src,
const typename Hi5Tree::path_t & path);
226 void writeText(
const Hi5Tree &src,
const std::list<typename Hi5Tree::path_t> & paths, std::ostream & ostr = std::cout);
230 void writeText(
const Hi5Tree &src, std::ostream & ostr = std::cout){
231 std::list<typename Hi5Tree::path_t> paths;
242 void readText(Hi5Tree &src, std::istream & istr = std::cin);
259 void parsePath(
const std::string & line, Hi5Tree::path_t & path, std::string & attrKey, std::string & attrValue);
268 void readTextLine(Hi5Tree &src,
const std::string & line);
293std::ostream & operator<<(std::ostream &ostr,
const hi5::NodeHi5 &n);
296std::ostream & operator<<(std::ostream &ostr,
const Hi5Tree & tree);
Handler for notifications sent by a Logger.
Definition Log.h:159
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:326
Logger & start(const TT &... args)
General.
Definition Log.h:378
void importMap(const std::map< std::string, S > &m)
Assign values from a map, overriding existing entries.
Definition SmartMap.h:253
static void getPaths(const TR &tree, S &container)
Retrieve all the paths.
Definition TreeUtils.h:62
A map of Variables.
Definition VariableMap.h:61
Class for multi-channel digital images. Supports dynamic typing with base types (char,...
Definition Image.h:183
Base class for Reader and Writer, essentially just wrapping some utilities.
Definition Hi5.h:169
static void writeText(const Hi5Tree &src, const std::list< typename Hi5Tree::path_t > &paths, std::ostream &ostr=std::cout)
Dumps the H5 structure, attributes and data properties.
Definition Hi5.cpp:408
static hid_t getH5StandardType(const std::type_info &type)
Give a native C++ type, returns a standard(?) HDF5 data type.
Definition Hi5.cpp:218
static drain::image::Image & getPalette(Hi5Tree &dst)
Creates a 256-element RGB palette to be referenced with linkPalette().
Definition Hi5.cpp:348
static void deleteExcluded(Hi5Tree &src)
Traverse subtree setting exclude=true .
Definition Hi5.cpp:563
static void parsePath(const std::string &line, Hi5Tree::path_t &path, std::string &attrKey, std::string &attrValue)
Split full path string to path object and attribute key.
Definition Hi5.cpp:548
static hid_t getH5NativeDataType()
Given a native C++ type, returns a native HDF5 data type.
Definition Hi5.h:202
static void writeText(const Hi5Tree &src, std::ostream &ostr=std::cout)
Dumps the H5 structure, attributes and data properties. (Calls writeText(src, src....
Definition Hi5.h:230
static bool isExcluded(const Hi5Tree &src, const typename Hi5Tree::path_t &path)
Check is the path contains at least one exclude marker, meaning that data at the path should be bypas...
Definition Hi5.cpp:390
static void assignAttribute(Hi5Tree &dst, const std::string &assignment)
Definition Hi5.cpp:468
static void linkPalette(const Hi5Tree &palette, Hi5Tree &dst)
Links the palette that has been (or will be) created with createPalette().
Definition Hi5.cpp:383
static void readText(Hi5Tree &src, std::istream &istr=std::cin)
Constructs a tree from formatted text. See writeText().
Definition Hi5.cpp:426
static void readTextLine(Hi5Tree &src, const std::string &line)
Assign a value with optional type specification.
Definition Hi5.cpp:447
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition Data.h:1293
DOC: Add class description.
Definition ODIMPath.h:82
Rack's hi5 structure that uses Rack classes (Tree, Data, Image).
Definition Hi5.h:71
void writeText(std::ostream &ostr, const std::string &prefix) const
Definition Hi5.cpp:147
bool exclude
Marker for excluding from any "serious" file write.
Definition Hi5.h:119
std::map< std::string, rack::ODIMPathElem > lookup_t
Experimental.
Definition Hi5.h:122