Re: ROOT files from FORTRAN

Valery Fine (fine@mail.cern.ch)
Tue, 23 Sep 1997 09:51:01 +0100


On 23 Sep 97 at 8:18, Boris.Zagreev@cern.ch wrote:

> Is it possible to write ROOT files directly from FORTRAN?

There are 3 questions here.

1. Since with OO we usually have no subroutine/function but method
instead the question above looks as follows:

Is it possible to create a C++ object on the Fortran level and
call its method?

I would say it is quite complicated.

2. Is it possible to call/create some intermediate C++ function (not
method) to call it from within fortran code? It is assume that
Fortran will pass the parameters to this function and the
last will generate C++ objects and call Write() method to write
it out.

I think it is possible and even the name of these wrapping
subroutine/function could be taken from HBOOK as well as the
lists of its parameters.

3. The last question whether it is worth? Namely is there anybody
willing to pay (i.e. to spend his own time) writing this
wrapper and make it available for whole community (for FREE)?
(I think it is a job for some smart student with Fortran and
C++ skill)

On this point I have no answer, may be Rene or someone from
our list has (alas myself have no student).

> In principle i can write ntuple and then transform it to root file
> but it is not convinuent and requres CERN libraries just to make
> some temporary file.

With my best regards,
Valery
With my best regards,
Valery
Dr. Valeri Faine (Valery Fine)
------------ ------------- Phone: +41 22 767 4921
CERN FAX : +41 22 767 7155
CH-1211 Geneva, 23 mailto:fine@mail.cern.ch
Switzerland http://nicewww.cern.ch/~fine