32#ifndef RACK_DATATOOLS_H
33#define RACK_DATATOOLS_H
38#include <drain/image/CoordinatePolicy.h>
39#include <drain/util/ReferenceMap.h>
61 bool attributeColors =
true;
62 bool skipExcluded =
true;
142 typedef std::map<std::string, ODIMPathElem> quantity_map;
149 void superDump(
const Hi5Tree & src, std::ostream & ostr = std::cerr);
175 bool treeToStream(
const Hi5Tree::node_data_t & data, std::ostream &ostr);
301 if (p.empty() || !p.front().isRoot()){
302 mout.debug(
"add root and restart with path= '" , p ,
"' (revised code)" );
305 pRooted.appendElem(Hi5Tree::path_t::elem_t::ROOT);
313 mout.debug(
"path= '" , p ,
"'" );
315 Hi5Tree::path_t path;
316 std::stringstream sstr;
319 for (Hi5Tree::path_t::elem_t elem: p){
321 path.appendElem(elem);
323 mout.debug(
"check='" , path ,
"'" );
325 const Hi5Tree & s = src(path);
333 for(
const auto & entry: group.attributes){
336 sstr << elem <<
':' << entry.first;
395 for (std::set<ODIMPathElem>::const_iterator git = EncodingODIM::attributeGroups.begin(); git != EncodingODIM::attributeGroups.end(); ++git){
396 const hi5::NodeHi5 & group = s[*git].data;
397 for(drain::VariableMap::const_iterator ait = group.attributes.begin(); ait != group.attributes.end(); ait++){
399 sstr << *git << ':' << ait->first;
400 //mout.debug(8) << "getAttributes: " << sstr.toStr() << '=' << it->second << mout.endl;
402 attributes[sstr.str()] = ait->second;
404 typename M::iterator it = attributes.find(sstr.str());
405 if (it != attributes.end())
406 it->second = ait->second;
412 if (i == std::string::npos){
413 //if (drain::Debug > 4){ std::cerr << "attributes " << attributes << '\n'; }
417 i = path.find('/', i+1);
419 //while (i < path.size()); //(i != std::string::npos);
A map of FlexVariable:s.
Definition VariableMap.h:144
LogSourc e is the means for a function or any program segment to "connect" to a Log.
Definition Log.h:326
A map of Variables.
Definition VariableMap.h:61
Policies for coordinate underflows and overflows.
Definition CoordinatePolicy.h:100
A map of radar data, indexed by quantity code (DBZH, VRAD, etc).
Definition Data.h:1293
static const ODIMPathElemSeq & attributeGroups
Copies contents of this to a h5 group.
Definition EncodingODIM.h:337
DOC: Add class description.
Definition ODIMPath.h:82
DOC: Add class description.
Definition DataTools.h:52
Definition AltitudeOp.cpp:42
std::map< std::string, ODIMPathElem > ODIMPathElemMap
Definition ODIMPath.h:474
QuantityMap & getQuantityMap()
Definition QuantityMap.cpp:282
Rack's hi5 structure that uses Rack classes (Tree, Data, Image).
Definition Hi5.h:71