Re: gh2root

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Aug 11 1998 - 11:11:06 MEST


Nikolai,
When using Zebra/FZ files, gh2root expects a file in
binary machine independant format using C I/O.
You should create your file within Geant with
   call cfopen(67,..
   call gopen(67,"OXL",900,ier)

If you want to keep your existing FZ file (native format
and Fortran I/O), you must edit the main program
of gh2root replacing the call to cfopen by a Fortran
Open statement followed by
  call fzfile(lun,lrecl,'I')

Please, communicate with me directly on this problem, not
to roottalk.

Rene Brun

>Hello rooters,

> The problem I try to solve is the conversion of GEANT hits into root
>file. I followed all instructions in gh2root home page:
>http://root.cern.ch/root/gh2root.html.

>However, I suspect that I could do something wrong with GEANT (sorry,
for
>FORTRAN code):

>1.
>
>         open(UNIT=67,FILE='g2out.dat',FORM='unformatted',
>     $        STATUS='UNKNOWN',err=999)
>         call gopen(67,'O',1024,ier)
>         call gfout(67,'SETS',1,0,' ',ier)
>         call gfout(67,'HITS',1,0,' ',ier)
>         call gfout(67,'VERT',1,0,' ',ier)
>         call gfout(67,'KINE',1,0,' ',ier)
>         call gclose(67,ier)
>
>it works fine: no complains from the GEANT. I have FZ-formatted
g2out.dat
>filled (readable back by GEANT).
>
>2.
> then I try:
>gh2root g3out.dat MC 1024
>                                  and get this:
>  Opening FZ file:g3out.dat with LRECL= 1024
> reading fz file, lun= 3
>
> FZIDIA.  LUN=   3 BAD CONSTRUCTION
>          IQUEST(1/2/3)=  -4       0       1
>          IQUEST(11-) =   -4 201   0
>i=  1 quest(1)=-4 nuhead=100 head1=   0 head2=**** head3={±
>i=  1 quest(1)= 5 nuhead=100 head1=   0 head2=**** head3={±
>  file:MCRun.h has been generated
>  file:MCMaker.cxx has been generated
>  jset= 0
> GEANT file: g3out.dat converted to ROOT classes: MCxxx

>MCMaker.h is not produced!

>How I can solve the problem?

>For a moment I will try to convert hits in the ntuple into root file.



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