Hi Dimos,

h5dump, starting at the root group (“/“), loops through every link of the group
and follows it to its target. If the target is a dataset, it dumps its 
information. If it
is another group, its recursively go to the target group and repeats the 
process.

Another way to describe the process is:
You may consider an HDF5 file as a single-root-directed-graph where groups are 
the nodes,
datasets are the leaves. h5dump initially traverses the whole graph to collect 
all the nodes.
(This is needed so that h5dump can detect any circles.)
Then h5dump, starting at the root group, walks down every node (group), loops 
through all its
links. If a link leads to another node (group), it move to it and recursively 
loops through 
all its links. (That is, it is depth first traverse). If it encounters a leaf 
(e.g., a dataset),
it dump its information.

Hope this answers your question about the structure.

-Albert Cheng
THG staff

On Nov 1, 2015, at 11:43 PM, Dimos Stamatakis <[email protected]> wrote:

> Hello,
> 
> sorry for the double post, but for some reason this question went under 
> another thread.
> 
> I am working on creating a custom VOL plugin, and I have trouble 
> understanding how the h5dump determines the contents of the file. 
> 
> Say for example that we have a file with two groups, like: /group1/group2. 
> 
> I noticed that initially it calls native_file_get to get the structure 
> containing information about accessing the file and then it calls 
> native_group_open and native_group_get for each group in the file, so it 
> would call: 
> 
> 1) native_file_open 
> 2) native_group_open and native_group_get for “/“ 
> 3) native_group_open and native_group_get for “group1“ 
> 4) native_group_open and native_group_get for group2“ 
> 
> 
> 
> I understand that the VOL plugin developer is responsible for representing 
> the contents of the file, but how does the h5dump tool know that the file 
> contains these groups, and calls native_group_open and native_group_get for 
> each of them? 
> 
> Many thanks in advance, 
> 
> Dimos 
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
> Twitter: https://twitter.com/hdf5


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to