From:	SMTP%"ROsborn@anl.gov" 29-APR-1998 16:55:41.79
To:	NAPI@anl.gov
CC:	
Subj:	Re: NXUenterdata

     Ray,

     some more:

> Why would the SDS need to be reopened?  Can't it stay open until you try and
>open another SDS?
    This is a good one. I do not know an good english proverb for such a
    situation but I have been blind to that option.


>>   NXmakedata and Nxopendata were kept separate in order to prevent
inadvertly
>>   creating SDSs with slightly misspelled names and without an error
return.

>I don't really understand this point; aren't you more likely to make a
>spelling mistake if you have to write the name three times instead of once? 
>I am arguing that we call NXputdata to create, open and write the SDS with
>whatever name we choose to give it.  We might make a spelling mistake, but
>then we might make a spelling mistake with NXmakedata with the same
>consequences. 

 you are right about this when writing. When reading you need only 
 NXopendata.

>Apart from purely philosophical considerations, is there a practical reason
>why we can't make the operation of NXputdata as follows:
>
>1) Check to see if SDS exists.  If not (and the NeXus file is open for write
>access), make it.  If there is an error in creating it, return with the
>error
>2) Check to see if the SDS is open.  If not, open it.  If there is an error
>in opening it, return with the error.
>3) Write the data, leaving the SDS open for subsequent NXputattr calls.  If
>there is an error writing it, return with the error.

>If we did this, I would like the units attribute installed as an optional
>final argument to NXputdata for the reasons I have given before.

 Add at 1): check if another SDS is open, if so close it.

 No, I think we can do this. But I'am reluctant to name this NXputdata. This
 would break a lot of my code. With another name (NXwritedata + a similar
 NXreaddata ?) OK. Or put it into the NeXus utilities. 

                                          Mark


