[NeXus-tech] Nexus C++ API by DESY

freddie.akeroyd at stfc.ac.uk freddie.akeroyd at stfc.ac.uk
Sat Feb 25 18:56:49 GMT 2012


Hi Eugen,

I've committed a few changes to the nexus trunk (http://trac.nexusformat.org/code/ticket/329) and can now run nxconvert on your data file. Not sure what h5dump is doing - I hadn't tried h5ls previously but it works fine for me too, so it may be a bug in h5dump 

Regards,

Freddie

-----Original Message-----
From: nexus-tech-bounces at nexusformat.org [mailto:nexus-tech-bounces at nexusformat.org] On Behalf Of Wintersberger, Eugen
Sent: 22 February 2012 22:25
To: nexus-tech at nexusformat.org
Subject: Re: [NeXus-tech] Nexus C++ API by DESY

Thanks for the response. Besides some other issues where I definitely made a mistake ("units" and "unit", etc.) this character string issue somehow puzzles me.

Here is the code that produces the string type for HDF5 (1.8.4):

 template<> H5Datatype H5DatatypeFactory::create_type<String>()
 {
     hid_t tid;
     tid = H5Tcopy(H5T_C_S1);
     H5Tset_strpad(tid,H5T_STR_NULLTERM);
     H5Tset_cset(tid,H5T_CSET_UTF8);
     //always use variable strings
     H5Tset_size(tid,H5T_VARIABLE);

     return H5Datatype(tid);
 }

When I have a look on the HDF5_version attribute with h5ls - I usually use this tool - I get something this


Opened "d4_test.h5" with sec2 driver.
/                        Group
    Attribute: HDF5_version scalar
        Type:      variable-length null-terminated UTF-8 string
        Data:  "1.8.4"

which is exactly what I would expect. However, using h5dump confirms Freddies comment that CSET is unknown. This is somehow strange.

Any ideas?

regards
   Eugen

_______________________________________________
NeXus-tech mailing list
NeXus-tech at nexusformat.org
http://lists.nexusformat.org/mailman/listinfo/nexus-tech
-- 
Scanned by iCritical.



More information about the NeXus-tech mailing list