Re: TChain::GetEntries

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 4 Sep 2008 21:06:55 -0500

Hi Akira,

I can not quite reproduce the problem, however a related issue (likely to be the cause of your problem) has been fixed in the SVN repository. You can work around the problem by calling chain->SetNotify(0); after the GetEntries:

{

   TChain* chain = new TChain("HondaTuple");    chain->Add("080731/glast-08073105590*.root");    Int_t n310 = chain->GetEntries("ptype==310");    chain->SetNotify(0);
   chain->Draw("log10(E-mass)>>htemp(100,1,4)", "(ptype==110)*2"); }

Cheers,
Philippe

>> OKUMURA, Akira wrote:

>>> Hello ROOTers,
>>>
>>> This short macro crashes with the error message attached at the end
>>> of this message.
>>>
>>> void flux()
>>> {
>>> TChain* chain = new TChain("HondaTuple");
>>> chain->Add("080731/glast-08073105590*.root");
>>> Int_t n310 = chain->GetEntries("ptype==310");
>>> chain->Draw("log10(E-mass)>>htemp(100,1,4)", "(ptype==110)*2");
>>> }
>>>
>>> If I comment out the line of TChain::GetEntries, it runs as I
>>> expected. How can I avoid this problem?
>>>
>>> I am using
>>> ROOT 5.20.00 w/ OS X 10.5.4 (Intel 64 bit)
>>> and
>>> ROOT 5.20.00 w/ Fedora 8 (64 bit)
>>>
>>> Please let me know if you need the input ROOT file to investigate
>>> the problem, I will upload them at private area.
>>>
>>> Regards,
>>>
>>> OKUMURA, Akira oxon_at_ceres.phys.s.u-tokyo.ac.jp
>>> Department of Physics, The University of Tokyo
>>> 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033
>>> TEL/FAX +81 3-5841-4173/4059
>>> Skype : okumura.akira
>>>
>>>

>>
> Received on Fri Sep 05 2008 - 04:07:06 CEST

This archive was generated by hypermail 2.2.0 : Fri Sep 05 2008 - 11:50:02 CEST