h2root for histo with errors

From: Andrei A. Salnikov (salnikov@inp.nsk.su)
Date: Mon Jun 14 1999 - 05:13:05 MEST


  Hi, root-tians!

  I have trouble converting my HBOOK files to root with h2root. The
problem is with the 1-dim histograms which contain errors - after
convertion to root they seem have their contents replaced with the errors.
Here is the simple sequence of commands to reproduce the problem. I'm
running root v2.21/08 on Redhat 5.1 with gcc 2.8.1. 

First, sequence of PAW commands to create and save 1-dim histo with
errors:

PAW > 1d 1 'Test histo with errors' 10 0.5 10.5
PAW > v/cre v(10) r 1 2 3 4 5 6 7 8 9 10
PAW > v/cre verr(10) r .5 .5 .5 .5 .5 .5 .5 .5 .5 .5
PAW > put/cont 1 v
PAW > put/err 1 verr
PAW > h/plo 1 e1
PAW > h/file 1 paw.hbook ! N
PAW > hrout 1
PAW > clo 1

  Then I convert the file to root:

> salnikov@sndxt4 [211] h2root paw.hbook
>  RZOPEN. problems determining record length -  trying EXCHANGE mode.
>  Converting directory //example
> TFile**         paw.root        HBOOK file: paw.hbook converted to ROOT
>  TFile*         paw.root        HBOOK file: paw.hbook converted to ROOT
>   KEY: TH1F     h1;1    Test histo with errors  

  And starting root session:

> root [0] TFile *f = new TFile("paw.root");
> root [1] h1->Draw("e1");

  I get the plot, which is quite different from what I get in PAW. It
seems that the content of the bins is replaced with the errors - all bins
are of the height 0.5. Also some funny characters appear in the label of
the horizontal axis (I have pictures for both PAW and root sessions - you
can look at them, if you like). So, what am I doing wrong? No one seen
this trouble before? 

  Cheers,
  Andrei.



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