Attribute parents

Hi folks
  has anyone an idea how to obtain the parent object an attribute is
attached to?

regards
  Eugen

···

--
---------------------------------------
DI. Dr. Eugen Wintersberger
                             
FS-EC
DESY
Notkestr. 85
D-22607 Hamburg
Germany

E-Mail: eugen.wintersberger@desy.de
Telefon: +49-40-8998-1917
---------------------------------------

Not the most direct way, but how about H5Iget_name?

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetName

"If the object identified by obj_id is an attribute, as determined via H5Iget_type,
H5Iget_name retrieves the name of the object to which that attribute is attached.
To retrieve the name of the attribute itself, use H5Aget_name."

G.

···

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Wintersberger, Eugen
Sent: Thursday, July 18, 2013 8:29 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Attribute parents

Hi folks
  has anyone an idea how to obtain the parent object an attribute is attached to?

regards
  Eugen
--
---------------------------------------
DI. Dr. Eugen Wintersberger
                             
FS-EC
DESY
Notkestr. 85
D-22607 Hamburg
Germany

E-Mail: eugen.wintersberger@desy.de
Telefon: +49-40-8998-1917
---------------------------------------

Thanks a lot for that hint. I will have a look at this.

regards
  Eugen

···

On Thu, 2013-07-18 at 09:00 -0500, Gerd Heber wrote:

Not the most direct way, but how about H5Iget_name?

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetName

"If the object identified by obj_id is an attribute, as determined via H5Iget_type,
H5Iget_name retrieves the name of the object to which that attribute is attached.
To retrieve the name of the attribute itself, use H5Aget_name."

G.

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Wintersberger, Eugen
Sent: Thursday, July 18, 2013 8:29 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Attribute parents

Hi folks
  has anyone an idea how to obtain the parent object an attribute is attached to?

regards
  Eugen
--
---------------------------------------
DI. Dr. Eugen Wintersberger
                             
FS-EC
DESY
Notkestr. 85
D-22607 Hamburg
Germany

E-Mail: eugen.wintersberger@desy.de
Telefon: +49-40-8998-1917
---------------------------------------

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Thanks a lot for that hint. I will have a look at this.

  I believe, but haven't tested, that you could use the attribute ID as the "loc_id" parameter to H5Oopen() as well. (Passing "." for the name)

  Quincey

···

On Jul 22, 2013, at 5:17 AM, "Wintersberger, Eugen" <eugen.wintersberger@desy.de> wrote:

regards
Eugen

On Thu, 2013-07-18 at 09:00 -0500, Gerd Heber wrote:

Not the most direct way, but how about H5Iget_name?

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetName

"If the object identified by obj_id is an attribute, as determined via H5Iget_type,
H5Iget_name retrieves the name of the object to which that attribute is attached.
To retrieve the name of the attribute itself, use H5Aget_name."

G.

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Wintersberger, Eugen
Sent: Thursday, July 18, 2013 8:29 AM
To: hdf-forum@lists.hdfgroup.org
Subject: [Hdf-forum] Attribute parents

Hi folks
has anyone an idea how to obtain the parent object an attribute is attached to?

regards
Eugen
--
---------------------------------------
DI. Dr. Eugen Wintersberger

FS-EC
DESY
Notkestr. 85
D-22607 Hamburg
Germany

E-Mail: eugen.wintersberger@desy.de
Telefon: +49-40-8998-1917
---------------------------------------

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Thanks for your advice Quincey - your approach seems to work. That
really simplifies my interface :wink:

regards
  Eugen

···

On Tue, 2013-07-23 at 22:33 +0000, Quincey Koziol wrote:

On Jul 22, 2013, at 5:17 AM, "Wintersberger, Eugen" <eugen.wintersberger@desy.de> wrote:

> Thanks a lot for that hint. I will have a look at this.

  I believe, but haven't tested, that you could use the attribute ID as the "loc_id" parameter to H5Oopen() as well. (Passing "." for the name)

  Quincey

> regards
> Eugen
>
> On Thu, 2013-07-18 at 09:00 -0500, Gerd Heber wrote:
>> Not the most direct way, but how about H5Iget_name?
>>
>> http://www.hdfgroup.org/HDF5/doc/RM/RM_H5I.html#Identify-GetName
>>
>> "If the object identified by obj_id is an attribute, as determined via H5Iget_type,
>> H5Iget_name retrieves the name of the object to which that attribute is attached.
>> To retrieve the name of the attribute itself, use H5Aget_name."
>>
>> G.
>>
>> -----Original Message-----
>> From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of Wintersberger, Eugen
>> Sent: Thursday, July 18, 2013 8:29 AM
>> To: hdf-forum@lists.hdfgroup.org
>> Subject: [Hdf-forum] Attribute parents
>>
>> Hi folks
>> has anyone an idea how to obtain the parent object an attribute is attached to?
>>
>> regards
>> Eugen
>> --
>> ---------------------------------------
>> DI. Dr. Eugen Wintersberger
>>
>> FS-EC
>> DESY
>> Notkestr. 85
>> D-22607 Hamburg
>> Germany
>>
>> E-Mail: eugen.wintersberger@desy.de
>> Telefon: +49-40-8998-1917
>> ---------------------------------------
>>
>>
>> _______________________________________________
>> Hdf-forum is for HDF software users discussion.
>> Hdf-forum@lists.hdfgroup.org
>> http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> Hdf-forum@lists.hdfgroup.org
> http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org