RE: [ROOT] [Fwd: tree->Draw segmentation violation]

From: Philippe Canal (pcanal@fnal.gov)
Date: Fri Dec 13 2002 - 23:04:52 MET


Hi Luis,

The problem is that your last event as an empty channel name (which is
stored in an old fashioned TLeafC class).  ROOT was not protected against
this case and will be fixed very shortly.

As a work-around you need to skip the last entry in your file. I.e. do:

higgs->Draw("higgsmass",mc,"","",higgs->GetEntries()-1,0);

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Luiz Martins Mundim
Filho
Sent: Friday, December 13, 2002 1:45 PM
To: Philippe Canal
Cc: Roottalk
Subject: Re: [ROOT] [Fwd: tree->Draw segmentation violation]


I'm using version 3.03/09. I tried to send the root file in attachment
twice, but after 4 days, the message did not reach the mailing list, I
thought it was because some spam/virus protection at CERN. I will try to
send it again on the next message.

thanks
Luiz

Philippe Canal wrote:

>Hi Luis,
>
>You do not specify the version of ROOT and the platform you are using.
>Please send me your root file so that I can try to reproduce your problem.
>
>Cheers,
>Philippe
>
>-----Original Message-----
>From: owner-roottalk@pcroot.cern.ch
>[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Luiz Martins Mundim
>Filho
>Sent: Friday, December 13, 2002 11:43 AM
>To: Roottalk
>Subject: [ROOT] [Fwd: tree->Draw segmentation violation]
>
>
>
>I sent this email twice days ago, but I don't know why, it doesn't get
>into the mailling list... maybe it is because the attachments. Lets try to
>solve this without them.
>
>
>---------------------------------------------------------------------------
-
>---------
>
>Hi Rooters
>
>I've got a strange problem. I have a simple tree and need to plot one
>variable with some cuts. I used to do
>root> .x cuts.C
>root>higgs->Draw("higgsmass",mc)
>
>So far, it goes fine, but if I try to plot either the same plot
>(with exactly the same command) or a new one, I got
>a segmentation violation. The crash doen't occurs if I don't use cuts.
>
>I could not send the tree (it is a small file), but I included a
>print of it. The file cuts.C just
>define what is MC (signal+background), signal and data.
>
>Thanks for any help.
>
>Luiz
>
>The file "cuts.C" is below:
>
>{
>TCut signal = "strstr(channel,\"higs\")*scaling";
>TCut data   = "strstr(channel,\"data\")";
>TCut backg  = !data*"(!strstr(channel,\"higs\"))*scaling";
>TCut mc     = "(!strstr(channel,\"data\"))*scaling";
>}
>
>
>root [1] higgs->Print()
>***************************************************************************
*
>**
>*Tree    :higgs     : Masses from Higgs3fit
>*
>*Entries :     6451 : Total =          499021 bytes  File  Size =
67736
>*
>*        :          : Tree compression factor =   1.00
>*
>***************************************************************************
*
>**
>*Br    0 :irun      : irun/I
>*
>*Entries :     6451 : Total  Size=      38196 bytes  File Size  =
0
>*
>*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    1 :ievt      : ievt/I
>*
>*Entries :     6451 : Total  Size=      38196 bytes  File Size  =
0
>*
>*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    2 :cms       : cms/I
>*
>*Entries :     6451 : Total  Size=      38190 bytes  File Size  =
0
>*
>*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    3 :channel   : channel/C
>*
>*Entries :     6451 : Total  Size=     134761 bytes  File Size  =
0
>*
>*Baskets :        2 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    4 :chrec     : chrec/C
>*
>*Entries :     6451 : Total  Size=     134741 bytes  File Size  =
0
>*
>*Baskets :        2 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    5 :higgsmass : higgsmass/F
>*
>*Entries :     6451 : Total  Size=      38226 bytes  File Size  =
0
>*
>*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    6 :eemass    : eemass/F
>*
>*Entries :     6451 : Total  Size=      38208 bytes  File Size  =
0
>*
>*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>*Br    7 :scaling   : scaling/F
>*
>*Entries :     6451 : Total  Size=      38214 bytes  File Size  =
0
>*
>*Baskets :        0 : Basket Size=      32000 bytes  Compression=   1.00
>*
>*..........................................................................
.
>.*
>
>
>
>
>
>



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:23 MET