Summary of answers and a new question

A.Buteau buteau at bali.saclay.cea.fr
Tue Dec 16 15:40:12 CST 1997



Thank you to all the people who answered me !!!

Nexus list seems to be an active list !!!

First the SUMMARY:

Question : >
> I read the Nexus www server and I have now the following questions:
> 
> 1)  Nexus defines various Groups to store datas like  NXsample  for instance 
> 
> I understood that NXSample is a NX_Group (not a NexusDataSet) but it seems to 
have a lot of attributes (name, chemical formula, electrical fiels , and so on).
> 
> I also understood that Nexus API provides functions to add attributes to data set 
only (and not to groups even if HDF allows to add Vgroup attributes ).
> 
> So my question is how should I add this kind of attributes to groups like 
NX_sample ?
> 

Answer: Nexus uses only the underlying HDF Vgroup and SDS: 
Moreover Nexus doesn't use Vgroup attributes.
So all the attributes of a Vgroup (as for instance the attribute temperature of the 
NXSample group) 
are declared as SDS.

The code to do this one operation, assuming that an NXentry group is
already open, would be

/* Open NXsample group within NXentry group */
    NXmakegroup (file_id, "Sample", "NXsample");
    NXopengroup (file_id, "Sample", "NXsample");
/* Output temperature */
    NXmakedata (file_id, "temperature", NX_FLOAT32, 1, 1);
    NXopendata (file_id, "temperature")
    NXputdata (file_id, temperature);
    NXputattr (file_id, "units", "K", 1, NX_CHAR);
/* Close NXsample group and close file */
    NXclosegroup (file_id);




> 
> 2)  a related question is : may somebody send me a real code example which fills 
more groups 
> than the small example given in the API document. (even if I cannot directly 
compile  this example , what I want is to see how people effectivly use the Nexus 
API).
> 

Thanks to all the contributors who sent real code wich helps a lot .



> 
> 3)  And a question related to HDF and not Nexus but maybe someone in this list 
may have solved the problem: for PC platforms , HDF gives  statically linked 
librairies for the MS compiler. Unfortunatly I use the Borland compiler which 
cannot link with these libs . Has anybody compiled the HDF librairies for BC++ 5.X 
> 
Compiling these librairies on a PC platform is really painful. I tried during a 
while but I gave up because technical problems
Thanks to  FORTNER Research (http://www.fortner.com) (which seems to be very active 
in the HDF market) I get their HDF DLLs and the linking
between Borland and DLL is quite easy to do .




Now the last question about the NXLog Type:
===========================================




I now understand how to write data whose type is  NX_CHAR , NX_FLOAT32, ,
but how should I write a data whose type is NXlog ?

I need further details please .






> 
> 



More information about the Neutron mailing list