Re: segfault trying to plot ntuples

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Fri, 4 Jun 2010 09:47:45 +0200


I cannot reproduce your problem using your script with no changes and your files.
I tried on Linux (32 and 64 bits) and mac

Rene Brun

Suvayu Ali wrote:
> Hi ROOT users,
>
> I have been facing a very strange segfault. I have a couple of ROOT
> files with lots of histograms and some ntuples. I was trying to write
> a few methods to navigate through the root files and find the desired
> ntuple and plot one of the variables on to a histogram. And then scale
> these and overlay them on one canvas.
>
> It works fine when I try to Draw them individually, or when I read
> them explicitly by using their names and Draw and overlay. But when I
> try to search and find them something goes wrong.
>
> Where am I going wrong? Thanks for any help on this.
>
> And a sample of the macro is attached. The root files I used are here:
> <http://hep.phys.sfu.ca/~suvayu/4roottalk/>
>
> Backtrace: (ROOT 5.26)
> ======================
>> #8 memcpy () at ../sysdeps/x86_64/memcpy.S:526
>> #9 0x00007f5cb7dcc492 in TBasket::ReadBasketBuffers (this=0x1bcb0d0,
>> pos=576290, len=219, file=0x20f0ee0) at tree/tree/src/TBasket.cxx:367
>> #10 0x00007f5cb7dd9896 in TBranch::GetBasket (this=0x1bcc500,
>> basketnumber=0) at tree/tree/src/TBranch.cxx:1068
>> #11 0x00007f5cb7dd9e05 in TBranch::GetEntry (this=0x1bcc500, entry=0,
>> getall=0) at tree/tree/src/TBranch.cxx:1170
>> #12 0x00007f5cb7667c78 in R__LoadBranch (br=0x1bcc500, entry=0,
>> quickLoad=true) at tree/treeplayer/src/TTreeFormula.cxx:98
>> #13 0x00007f5cb7679b39 in TTreeFormula::EvalInstance (this=0x1bcee20,
>> instance=0, stringStackArg=0x0) at
>> tree/treeplayer/src/TTreeFormula.cxx:3833
>> #14 0x00007f5cb765ede2 in TSelectorDraw::ProcessFill (this=0x1c2fdd0,
>> entry=0) at tree/treeplayer/src/TSelectorDraw.cxx:1091
>> #15 0x00007f5cb769755a in TTreePlayer::Process (this=0x1c30700,
>> selector=0x1c2fdd0, option=0x7f5cb7f1d400 "", nentries=553,
>> firstentry=0)
>> at tree/treeplayer/src/TTreePlayer.cxx:2796
>> #16 0x00007f5cb768dfb1 in TTreePlayer::DrawSelect (this=0x1c30700,
>> varexp0=0x7f5cb73aed73 "MET>>tmp_histo(100,0,100)",
>> selection=0x7f5cb7f1d400 "",
>> option=0x7f5cb7f1d400 "", nentries=1000000000, firstentry=0) at
>> tree/treeplayer/src/TTreePlayer.cxx:1073
>> #17 0x00007f5cb7e3a906 in TTree::Draw (this=0x1bcb720,
>> varexp=0x7f5cb73aed73 "MET>>tmp_histo(100,0,100)",
>> selection=0x7f5cb7f1d400 "", option=0x7f5cb7f1d400 "",
>> nentries=1000000000, firstentry=0) at tree/tree/src/TTree.cxx:3442
>> #18 0x00007f5cb7e1e7fc in TTree::Draw (this=0x1bcb720,
>> opt=0x7f5cb73aed73 "MET>>tmp_histo(100,0,100)") at include/TTree.h:259
>> #19 0x00007f5cb73adce5 in plot (key=0x1b35840, canvas=0x1c374b0) at
>> /home/jallad/codebaby/macros/sample.C:136
>> #20 0x00007f5cb73adbfd in read_dir (dir=0x1b63ad0, canvas=0x1c374b0)
>> at /home/jallad/codebaby/macros/sample.C:121
>> #21 0x00007f5cb73ad59f in overlay () at
>> /home/jallad/codebaby/macros/sample.C:51
>
Received on Fri Jun 04 2010 - 09:47:50 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 04 2010 - 11:50:01 CEST