H5GIterate does not complete Iteration of file

Hi,

I have an enquiry regarding the use of H5GIterate within C++ member
classes.

I call the H5GIterate giving it a fid ( obtained from H5Fopen ),the root
dir "\", and the function pointer below
static int HDF5Reader::read_header_objects(int group, const char* const
name, void* temp);

The result is that on execution, I enter the read_header_objects
function once, reading the name of the first group in the \ dir, but
then exit without re-entering.
In my file there is a second group at the \ level which does not get
read.

Note, I made the member function static as without it the iterated
function was not called at all - thus I suspect the problem may lie in
this area.

Would appreciate any ideas very much,

Regards,

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

</table> </Pre>
<HTML>
<br>
<br>
************************************************<br>
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.<br>
************************************************<br>
</HTML>

Hi Martin,

Hi,

I have an enquiry regarding the use of H5GIterate within C++ member classes.

I call the H5GIterate giving it a fid ( obtained from H5Fopen ),the root dir "\", and the function pointer below
static int HDF5Reader::read_header_objects(int group, const char* const name, void* temp);

The result is that on execution, I enter the read_header_objects function once, reading the name of the first group in the \ dir, but then exit without re-entering.

In my file there is a second group at the \ level which does not get read.

Note, I made the member function static as without it the iterated function was not called at all - thus I suspect the problem may lie in this area.

Would appreciate any ideas very much,

  Hmm, what was your return value from read_header_objects()? It must be '0' for the library to continue iteration. ('<0' indicates an error and '>0' indicates stopping the iteration for success)

  Quincey

···

On Aug 13, 2007, at 6:33 AM, Crowley, Martin (AELE) wrote:

Regards,

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

************************************************

The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.

************************************************

Thanks - that nearly sorts it. I had missed out the return value.
Interestingly though, on ensuring the return val was 0, it only iterated
through the groups ( as opposed to groups and datasets ). I have got
round this was calling iterate again within the read_header_objects(..)
function.
We call H5GIterate via our own internal dll calling mechanism ( for
various reasons ) which is perhaps somehow changing the return values??
But for now, I at least appear to have a working option, if not exactly
by the book. Thanks again.

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

···

-----Original Message-----
From: Quincey Koziol [mailto:koziol@hdfgroup.org]
Sent: 13 August 2007 19:06
To: Crowley, Martin (AELE)
Cc: hdf-forum@hdfgroup.org
Subject: Re: H5GIterate does not complete Iteration of file

Hi Martin,

On Aug 13, 2007, at 6:33 AM, Crowley, Martin (AELE) wrote:

Hi,

I have an enquiry regarding the use of H5GIterate within C++ member
classes.

I call the H5GIterate giving it a fid ( obtained from H5Fopen ),the
root dir "\", and the function pointer below
static int HDF5Reader::read_header_objects(int group, const char*
const name, void* temp);

The result is that on execution, I enter the read_header_objects
function once, reading the name of the first group in the \ dir, but
then exit without re-entering.

In my file there is a second group at the \ level which does not get
read.

Note, I made the member function static as without it the iterated
function was not called at all - thus I suspect the problem may lie in

this area.

Would appreciate any ideas very much,

  Hmm, what was your return value from read_header_objects()? It
must be '0' for the library to continue iteration. ('<0' indicates an
error and '>0' indicates stopping the iteration for success)

  Quincey

Regards,

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

************************************************

The information contained in, or attached to, this e-mail, may contain

confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to
legal privilege. If you have received this e-mail in error you should
notify the sender immediately by reply e-mail, delete the message from

your system and notify your system manager.
Please do not copy it for any purpose, or disclose its contents to any

other person. The views or opinions presented in this e-mail are
solely those of the author and do not necessarily represent those of
the company. The recipient should check this e-mail and any
attachments for the presence of viruses. The company accepts no
liability for any damage caused, directly or indirectly, by any virus
transmitted in this email.

************************************************

************************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
************************************************

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

Hi Martin,

Thanks - that nearly sorts it. I had missed out the return value.
Interestingly though, on ensuring the return val was 0, it only iterated
through the groups ( as opposed to groups and datasets ). I have got
round this was calling iterate again within the read_header_objects(..)
function.
We call H5GIterate via our own internal dll calling mechanism ( for
various reasons ) which is perhaps somehow changing the return values??
But for now, I at least appear to have a working option, if not exactly
by the book. Thanks again.

  Hmm, are the datasets in sub-groups? If so, that would explain it: the H5Giterate call does not recurse the entire group hierarchy, just the particular links in a single group. (The right solution is to do what you did though. :slight_smile:

  Quincey

···

On Aug 15, 2007, at 2:41 AM, Crowley, Martin (AELE) wrote:

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

-----Original Message-----
From: Quincey Koziol [mailto:koziol@hdfgroup.org]
Sent: 13 August 2007 19:06
To: Crowley, Martin (AELE)
Cc: hdf-forum@hdfgroup.org
Subject: Re: H5GIterate does not complete Iteration of file

Hi Martin,

On Aug 13, 2007, at 6:33 AM, Crowley, Martin (AELE) wrote:

Hi,

I have an enquiry regarding the use of H5GIterate within C++ member
classes.

I call the H5GIterate giving it a fid ( obtained from H5Fopen ),the
root dir "\", and the function pointer below
static int HDF5Reader::read_header_objects(int group, const char*
const name, void* temp);

The result is that on execution, I enter the read_header_objects
function once, reading the name of the first group in the \ dir, but
then exit without re-entering.

In my file there is a second group at the \ level which does not get
read.

Note, I made the member function static as without it the iterated
function was not called at all - thus I suspect the problem may lie in

this area.

Would appreciate any ideas very much,

  Hmm, what was your return value from read_header_objects()? It
must be '0' for the library to continue iteration. ('<0' indicates an
error and '>0' indicates stopping the iteration for success)

  Quincey

Regards,

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

************************************************

The information contained in, or attached to, this e-mail, may contain

confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to
legal privilege. If you have received this e-mail in error you should
notify the sender immediately by reply e-mail, delete the message from

your system and notify your system manager.
Please do not copy it for any purpose, or disclose its contents to any

other person. The views or opinions presented in this e-mail are
solely those of the author and do not necessarily represent those of
the company. The recipient should check this e-mail and any
attachments for the presence of viruses. The company accepts no
liability for any damage caused, directly or indirectly, by any virus
transmitted in this email.

************************************************

************************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
************************************************

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

I hadn't realised that - yes, in this case the datasets are indeed in
sub-groups. So that is good news in that we appear to be doing the right
thing.

Thanks,

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

···

-----Original Message-----
From: Quincey Koziol [mailto:koziol@hdfgroup.org]
Sent: 15 August 2007 20:44
To: Crowley, Martin (AELE)
Cc: hdf-forum@hdfgroup.org
Subject: Re: H5GIterate does not complete Iteration of file

Hi Martin,

On Aug 15, 2007, at 2:41 AM, Crowley, Martin (AELE) wrote:

Thanks - that nearly sorts it. I had missed out the return value.
Interestingly though, on ensuring the return val was 0, it only
iterated through the groups ( as opposed to groups and datasets ). I
have got round this was calling iterate again within the
read_header_objects
(..)
function.
We call H5GIterate via our own internal dll calling mechanism ( for
various reasons ) which is perhaps somehow changing the return
values??
But for now, I at least appear to have a working option, if not
exactly by the book. Thanks again.

  Hmm, are the datasets in sub-groups? If so, that would explain
it:
the H5Giterate call does not recurse the entire group hierarchy, just
the particular links in a single group. (The right solution is to do
what you did though. :slight_smile:

  Quincey

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

-----Original Message-----
From: Quincey Koziol [mailto:koziol@hdfgroup.org]
Sent: 13 August 2007 19:06
To: Crowley, Martin (AELE)
Cc: hdf-forum@hdfgroup.org
Subject: Re: H5GIterate does not complete Iteration of file

Hi Martin,

On Aug 13, 2007, at 6:33 AM, Crowley, Martin (AELE) wrote:

Hi,

I have an enquiry regarding the use of H5GIterate within C++ member
classes.

I call the H5GIterate giving it a fid ( obtained from H5Fopen ),the
root dir "\", and the function pointer below
static int HDF5Reader::read_header_objects(int group, const char*
const name, void* temp);

The result is that on execution, I enter the read_header_objects
function once, reading the name of the first group in the \ dir, but
then exit without re-entering.

In my file there is a second group at the \ level which does not get
read.

Note, I made the member function static as without it the iterated
function was not called at all - thus I suspect the problem may lie
in

this area.

Would appreciate any ideas very much,

  Hmm, what was your return value from read_header_objects()? It

must

be '0' for the library to continue iteration. ('<0' indicates an
error and '>0' indicates stopping the iteration for success)

  Quincey

Regards,

Martin Crowley
GE
Aviation
Digital Systems
Information Systems (Southampton)
Senior Software Engineer, R&TD

T: +44 (0)23 8024 2000
D: +44 (0)23 8024 2109
F: +44 (0)23 8024 2001
E: Martin.Crowley@smiths-aerospace.com
www.ge.com/aviation

School Lane, Chandlers Ford
Eastleigh, Hampshire, SO53 4YG, UK
GE Aviation is the business name for Smiths Aerospace Limited

************************************************

The information contained in, or attached to, this e-mail, may
contain

confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to

legal privilege. If you have received this e-mail in error you should

notify the sender immediately by reply e-mail, delete the message
from

your system and notify your system manager.
Please do not copy it for any purpose, or disclose its contents to
any

other person. The views or opinions presented in this e-mail are
solely those of the author and do not necessarily represent those of
the company. The recipient should check this e-mail and any
attachments for the presence of viruses. The company accepts no
liability for any damage caused, directly or indirectly, by any virus

transmitted in this email.

************************************************

************************************************
The information contained in, or attached to, this e-mail, may contain

confidential information and is intended solely for the use of the
individual or entity to whom they are addressed and may be subject to
legal privilege. If you have received this e-mail in error you should

notify the sender immediately by reply e-mail, delete the message from

your system and notify your system manager. Please do not copy it for

any purpose, or disclose its contents to any other person. The views
or opinions presented in this e-mail are solely those of the author
and do not necessarily represent those of the company. The recipient
should check this e- mail and any attachments for the presence of
viruses. The company accepts no liability for any damage caused,
directly or indirectly, by any virus transmitted in this email.
************************************************

----------------------------------------------------------------------
This mailing list is for HDF software users discussion.
To subscribe to this list, send a message to hdf-forum-
subscribe@hdfgroup.org.
To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.

************************************************
The information contained in, or attached to, this e-mail, may contain confidential information and is intended solely for the use of the individual or entity to whom they are addressed and may be subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.
************************************************