Re: your mail

From: Alexander Zvyagin (zvyagin@mx.ihep.su)
Date: Fri Dec 04 1998 - 03:54:36 MET


Date: Fri, 4 Dec 1998 11:51:06 +0000
From: Alexander Zvyagin <ZVYAGIN@mx.ihep.su>
X-Sender: ZVYAGIN@polar.ihep.su
To: Canguo Li <licg@hpws7.ihep.ac.cn>
cc: roottalk@hpsalo.cern.ch
Subject: Re: your mail
Message-ID: <Pine.VMS.3.91-b11-vms.981204111913.20688A-100000@polar.ihep.su>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

Dear Canguo,

>  Thank you very much for offering answer and help to my question on how to 
> read key'ed free formatted ascii data. I've tried to understand your code
> (perhaps a schematic one). I believe it does the job. However, it seems 
> FFKEY is called for each integer or float number or an 1-d array. Then does 
> this mean a card can contain only a single integer or a float number
> or an 1-d array?

Yes. Available types are INTEGER, REAL and 1-dim array of INTEGER of FLOAT.
It is possible to add CHARACTER type too.

> > ffkey_(key,ptr,Nvar,type,strlen(key),strlen(type));
> 
>   Is this the way to call fortran subroutine ffkey_ (in FFREAD package) --
> adding 2 more arguments strlen(key), strlen(type) in the call?

Exactly. I work on PC under Linux OS. If you pass character variable for
fortran subroutine you must add it length to arguments list also.

> I understand
> fortran would require this info, but is the order implementation-independent?

It works under Linux, HP-Unix. May be on other Unixes too. And it definitly 
should not work on M$Windows XXX.

>  Then I still need to "order" some features for the evolving ROOT, that
> utilities for reading key'ed free format data cards be available.
> I'm still in the process studying Rene Brun's reply(thanks to Rene), and 
> learning ROOT basics. I hope the answer is already in the ROOT.

Please, use C++ code instead of FFREAD packet. Your code will be easy and 
more flexible. (I use FFREAD only because it is used in GEANT321.)

With best wishes,
Alexander.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:40 MET