TTree->Draw problem in ROOT 6.12

I have a problem with TTree->Draw() in ROOT 6.12 but not in 6.10
I did a simple example with this test.dat file:
1 5
2 10
3 15

First, the example that works using ROOT 6.10:

$ rootn.exe
  ------------------------------------------------------------
 | Welcome to ROOT 6.10/09                [http://root.cern.ch](http://root.cern.ch/) |
 |                               (c) 1995-2017, The ROOT Team |
 | Built for linuxx8664gcc                                    |
 | From tag , 16 October 2017                                 |
 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
  ------------------------------------------------------------

root [0] TTree *t = new TTree("data","title")
(TTree *) 0x2768a88
root [1] t->ReadFile("test.dat","X/I:Y/I")
(long long) 3
root [2] t->Print()
******************************************************************************
*Tree    :data      : title                                                  *
*Entries :        3 : Total =            1526 bytes  File  Size =          0 *
*        :          : Tree compression factor =   1.00                       *
******************************************************************************
*Br    0 :X         : X/I                                                    *
*Entries :        3 : Total  Size=        622 bytes  One basket in memory    *
*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00     *
*............................................................................*
*Br    1 :Y         : Y/I                                                    *
*Entries :        3 : Total  Size=        622 bytes  One basket in memory    *
*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00     *
*............................................................................*
root [3] t->Scan()
************************************
*    Row   *         X *         Y *
************************************
*        0 *         1 *         5 *
*        1 *         2 *        10 *
*        2 *         3 *        15 *
************************************
(long long) 3
root [4] t->Draw("Y")
Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1
root [5] .q

Then, the identical thing in ROOT 6.12:

$ rootn.exe
  ------------------------------------------------------------
 | Welcome to ROOT 6.12/07                [http://root.cern.ch](http://root.cern.ch/) |
 |                               (c) 1995-2017, The ROOT Team |
 | Built for linuxx8664gcc                                    |
 | From tag , 9 February 2018                                 |
 | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
  ------------------------------------------------------------

root [0] TTree *t = new TTree("data","title")
(TTree *) 0x2ee6948
root [1] t->ReadFile("test.dat","X/I:Y/I")
(long long) 3
root [2] t->Print()
******************************************************************************
*Tree    :data      : title                                                  *
*Entries :        3 : Total =            1559 bytes  File  Size =          0 *
*        :          : Tree compression factor =   1.00                       *
******************************************************************************
*Br    0 :X         : X/I                                                    *
*Entries :        3 : Total  Size=        633 bytes  One basket in memory    *
*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00     *
*............................................................................*
*Br    1 :Y         : Y/I                                                    *
*Entries :        3 : Total  Size=        633 bytes  One basket in memory    *
*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00     *
*............................................................................*
root [3] t->Scan()
************************************
*    Row   *         X *         Y *
************************************
*        0 *         1 *         5 *
*        1 *         2 *        10 *
*        2 *         3 *        15 *
************************************
(long long) 3
root [4] t->Draw("Y")

*** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:
===========================================================
#0  0x00007effbd6a689e in waitpid () from /lib64/libc.so.6
#1  0x00007effbd6384e9 in do_system () from /lib64/libc.so.6

I’ve verified that I can then switch back to ROOT 6.10 and these steps again run correctly.

v612 is old and v610 even older. I just tried with the ROOT head and the soon coming v616 version It works fine. I am on Mac.

$ root
   ------------------------------------------------------------
  | Welcome to ROOT 6.17/01                  https://root.cern |
  |                               (c) 1995-2018, The ROOT Team |
  | Built for macosx64 on Dec 11 2018, 09:06:00                |
  | From heads/master@v6-16-00-rc1-305-gdf8993bddd             |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] TTree *t = new TTree("data","title")
(TTree *) 0x7fd134e420d0
root [1] t->ReadFile("test.dat","X/I:Y/I")
(long long) 3
root [2] t->Scan()
************************************
*    Row   *         X *         Y *
************************************
*        0 *         1 *         5 *
*        1 *         2 *        10 *
*        2 *         3 *        15 *
************************************
(long long) 3
root [3]  t->Draw("Y")
Info in <TCanvas::MakeDefCanvas>:  created default TCanvas with name c1
root [4] 

By the way, why do you use “rootn.exe” and not simply “root” ?

I’m working with CMS software and ROOT 6.12 is the version I get with the version of CMS software I was using. I’ll look into using a more up-to-date version but am still curious why this feature would work in 6.10 and 6.17 but be broken in 6.12.

Also, I’ve been working with ROOT for a long time. I think that the rootn.exe format is a very old equivalent of root -l, i.e. doesn’t show the splash screen.

rootn.exe is an other module . Can you tried 'root -l '?

As far as I can tell, rootn.exe and root -l start the same code running. I’ve used them interchangeably and never observed any difference. Maybe I’m missing something subtle?

Carefully compare:

man root
man root.exe
man rootn.exe

Stay away from rootn.exe unless you really really really know what you are doing.

The system on which I’m running root does not have “man root” functionality working. If the differences are very short, can you post them here.

You will find information here.

any way use the normal root. not rootn

please , help me
root data analysis Write a script
• Write a script to analyse the data in ASCII file exo_j2.data . Each line of the file has 4 values corresponding to variables x,y,z et e (How original!) x de -25 à 25, y de -25 à 25, z de -10 à 10, e de -500 à 2500
*how I solved ?

You can reuse this thread:

See also:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.