bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
h5das.cc File Reference

Data attributes processing source. More...

#include <memory>
#include "hdf5_handler.h"
#include "HDF5RequestHandler.h"
#include <BESDebug.h>
Include dependency graph for h5das.cc:

Go to the source code of this file.

Functions

void add_group_structure_info (DAS &das, const char *gname, const char *oname, bool is_group)
 
void depth_first (hid_t pid, const char *gname, DAS &das)
 
void find_gloattr (hid_t file, DAS &das)
 
string get_hardlink (hid_t pgroup, const string &oname)
 
void get_softlink (DAS &das, hid_t pgroup, const char *gname, const string &oname, int index, size_t val_size)
 
void read_comments (DAS &das, const string &varname, hid_t oid)
 
void read_objects (DAS &das, const string &varname, hid_t oid, int num_attr)
 

Variables

HDF5PathFinder paths
 A variable for remembering visited paths to break cyclic HDF5 groups.
 

Detailed Description

Data attributes processing source.

This file is part of h5_dap_handler, a C++ implementation of the DAP handler for HDF5 data.

This is the HDF5-DAS that extracts DAS class descriptors converted from HDF5 attribute of an hdf5 data file.

Author
Hyo-Kyung Lee hyokl.nosp@m.ee@h.nosp@m.dfgro.nosp@m.up.o.nosp@m.rg
Kent Yang myang.nosp@m.6@hd.nosp@m.fgrou.nosp@m.p.or.nosp@m.g

Definition in file h5das.cc.

Function Documentation

◆ add_group_structure_info()

void add_group_structure_info ( DAS & das,
const char * gname,
const char * oname,
bool is_group )

Definition at line 672 of file h5das.cc.

◆ depth_first()

void depth_first ( hid_t pid,
const char * gname,
DAS & das )

depth first traversal of hdf5 file attributes.

This function will walk through an hdf5 group using depth- first approach to obtain all the group and dataset attributes of an hdf5 file. During the process of the depth first search, DAS table will be filled. In case of errors, an exception will be thrown.

Parameters
piddataset id(group id)
gnamegroup name(absolute name from the root group)
dasreference of DAS object
Returns
void

To keep track of soft links.

Definition at line 64 of file h5das.cc.

◆ find_gloattr()

void find_gloattr ( hid_t file,
DAS & das )

will fill in attributes of the root group into one DAS table.

The attributes are treated as global attributes.

Parameters
dasDAS object reference
fileHDF5 file id
Exceptions
msgstring of error message to the dods interface.
Returns
void

Definition at line 444 of file h5das.cc.

◆ get_hardlink()

string get_hardlink ( hid_t h5obj_id,
const string & oname )

will put hardlink information into a DAS table.

Parameters
pgroupobject id
onameobject name: absolute name of a group
Returns
true if succeeded.
false if failed.
Remarks
In case of error, it returns a string of error message to the DAP interface.
Warning
This is only a test, not supported in current version.

will put hardlink information into a DAS table.

Parameters
h5obj_idobject id
onameobject name: absolute name of a group
Returns
true if succeeded.
false if failed.
Remarks
In case of error, it returns a string of error message to the DAP interface.

Definition at line 569 of file h5das.cc.

◆ get_softlink()

void get_softlink ( DAS & das,
hid_t pgroup,
const char * gname,
const string & oname,
int index,
size_t val_size )

Definition at line 523 of file h5das.cc.

◆ read_comments()

void read_comments ( DAS & das,
const string & varname,
hid_t oid )

will fill in attributes of a group's comment into DAS table.

Parameters
dasDAS object: reference
varnameabsolute name of an object
oidobject id
Returns
nothing

Definition at line 625 of file h5das.cc.

◆ read_objects()

void read_objects ( DAS & das,
const string & varname,
hid_t oid,
int num_attr )

will fill in attributes of a dataset or a group into one DAS table.

Parameters
dasDAS object: reference
varnameabsolute name of an HDF5 dataset or an HDF5 group
oidHDF5 object id(a handle)
num_attrnumber of attributes.
Returns
nothing
See also
get_attr_info(hid_t dset, int index,bool, DSattr_t * attr_inst_ptr,bool *ignoreptr)
get_dap_type()

Definition at line 299 of file h5das.cc.

Variable Documentation

◆ paths

A variable for remembering visited paths to break cyclic HDF5 groups.

Definition at line 47 of file h5das.cc.