Re: TNtuple doesn't fill after upgrading from ROOT version v5.22 to ROOT version v5.24

From: Arne Vandenbroucke <arnevdb_at_stanford.edu>
Date: Fri, 10 Jul 2009 13:40:18 -0700


Hello Philippe,

  The problem was related to the $LD_LIBRARY_PATH settings, I didn't clean it before assigning the new libs:

  arne_at_m011-arnevdb RMD_ANA]$ echo $LD_LIBRARY_PATH /home/products/ROOT/new/lib/root:/home/arne/root/macros:/home/products/root/root_v5.24.00/lib/:/home/arne/root/macros:

[arne_at_m011-arnevdb RMD_ANA]$ ./readdata_deb -f testt.txt Reading file :: testt.txt
  found 1000 points
1000 Tree entries
0 Ntuple entries

-------> EMPTY Ntuple !!!

[arne_at_m011-arnevdb RMD_ANA]$ LD_LIBRARY_PATH=""
[arne_at_m011-arnevdb RMD_ANA]$ source /home/products/set_env.sh
[arne_at_m011-arnevdb RMD_ANA]$ echo $LD_LIBRARY_PATH
/home/products/root/root_v5.24.00/lib/:/home/arne/root/macros: [arne_at_m011-arnevdb RMD_ANA]$ ./readdata_deb -f testt.txt Reading file :: testt.txt
  found 1000 points
1000 Tree entries
1000 Ntuple entries

-----> 1000 Entries :-D !!!!!

Thanks for your help !

  Arne.

On 07/10/2009 12:34 PM, Philippe Canal wrote:
> Hi Arne,
>
> I still can _not_ reproduce this problem. Can you try use valgrind
> in your case:
>
> valgrind ./readdata_deb -f testt.txt
>
> Cheers,
> Philippe.
>
> Arne Vandenbroucke wrote:
>> Hi Philippe,
>>
>> thanks for your answer. Attached you find the source code.
>>
>>
>> [arne_at_m011-arnevdb RMD_ANA]$ g++ -Wall -W -g -DDEBUG -fPIC -Wall -W
>> -g -DDEBUG -fPIC -pthread -m64
>> -I/home/products/root/root_v5.24.00/include -O3
>> -L/home/products/root/root_v5.24.00/lib -lCore -lCint -lRIO -lNet
>> -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix
>> -lPhysics -lMathCore -lThread -lGui -pthread -lm -ldl -rdynamic
>> readdata_deb.C -o readdata_deb
>>
>> [arne_at_m011-arnevdb RMD_ANA]$ ./readdata_deb -f testt.txt
>> Reading file :: testt.txt
>> found 1000 points
>> 1000 Tree entries
>> 0 Ntuple entries
>>
>> [arne_at_m011-arnevdb RMD_ANA]$ g++ -Wall -W -g -DDEBUG -fPIC -Wall -W
>> -g -DDEBUG -fPIC -pthread -m64
>> -I/home/products/ROOT/root_v5.22.00/include/root -O3
>> -L/home/products/ROOT/root_v5.22.00/lib/root -lCore -lCint -lRIO
>> -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript
>> -lMatrix -lPhysics -lMathCore -lThread -lGui -pthread -lm -ldl
>> -rdynamic readdata_deb.C -o readdata_deb
>>
>> [arne_at_m011-arnevdb RMD_ANA]$ ./readdata_deb -f testt.txt
>> Reading file :: testt.txt
>> found 1000 points
>> 1000 Tree entries
>> 1000 Ntuple entries
>>
>>
>> Thanks,
>>
>> Arne.
>>
>> On 07/10/2009 12:02 PM, Philippe Canal wrote:
>>> Hi Arne,
>>>
>>> I can _not_ reproduce this problem. Can you provide a complete
>>> running example?
>>>
>>> Cheers,
>>> Philippe.
>>>
>>>
>>> Arne Vandenbroucke wrote:
>>>> Hi,
>>>>
>>>> I upgraded to ROOT v5.24 today and ran into some problems with the
>>>> TNtuple Class. The problem is that my TNtuple does not seem to get
>>>> filled when using v5.24. If I am using v5.22 the Ntuple gets filled.
>>>> Below is the simple code I am using, compiled with both libraries. The
>>>> program's output is given too. For comparison I also fill a Tree,
>>>> the filling of the Tree seems to happen without problem.
>>>>
>>>> This is the relevant piece of my code::
>>>> cout<< "Reading file :: "<< filename<<endl;
>>>> datafile = new TFile(outfile,"RECREATE");
>>>> datantuple = new TNtuple("datantuple",filebase,"a1");
>>>> dattree = new TTree("dattree",filebase);
>>>> dattree->Branch("a1",&a1);
>>>> nlines=0;
>>>> in.open(filename);
>>>> while (1) {
>>>> in>> a1 ;
>>>> if (!in.good()) break;
>>>> datantuple->Fill(a1);
>>>> dattree->Fill();
>>>> nlines++;
>>>> }
>>>> printf(" found %d points\n",nlines);
>>>> cout<< dattree->GetEntries()<< " Tree entries"<<endl;
>>>> cout<< datantuple->GetEntries()<< " Ntuple entries"<<endl;
>>>>
>>>>
>>>> I compile it using:
>>>> g++ -Wall -W -g -DDEBUG -fPIC -Wall -W -g -DDEBUG -fPIC -pthread
>>>> -m64 -I/home/products/root/root_v5.24.00/include -O3
>>>> -L/home/products/root/root_v5.24.00/lib -lCore -lCint -lRIO -lNet
>>>> -lHist
>>>> -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics
>>>> -lMathCore -lThread -lGui -pthread -lm -ldl -rdynamic
>>>> readdata_deb.C -o
>>>> readdata_deb
>>>>
>>>> The output then gives:
>>>> ./readdata_deb -f ./testt.txt
>>>> Reading file :: ./testt.txt
>>>> found 1000 points
>>>> 1000 Tree entries
>>>> 0 Ntuple entries
>>>>
>>>> --> The Ntuple is empty !
>>>>
>>>>
>>>> If I compile it using the v5.22 libs::
>>>> g++ -Wall -W -g -DDEBUG -fPIC -Wall -W -g -DDEBUG -fPIC -pthread
>>>> -m64 -I/home/products/ROOT/new/include/root -O3
>>>> -L/home/products/ROOT/new/lib/root -lCore -lCint -lRIO -lNet -lHist
>>>> -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics
>>>> -lMathCore -lThread -lGui -pthread -lm -ldl -rdynamic
>>>> readdata_deb.C -o
>>>> readdata_deb
>>>>
>>>> The output now is:
>>>> Reading file :: ./testt.txt
>>>> found 1000 points
>>>> 1000 Tree entries
>>>> 1000 Ntuple entries
>>>>
>>>> --> The Ntuple has 1000 entries
>>>>
>>>> Could somebody explain what is going on ?
>>>>
>>>>
>>>> Thanks a lot for your time,
>>>>
>>>> Arne.
>>>>
>>>>
>>
Received on Fri Jul 10 2009 - 22:40:23 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 13 2009 - 17:50:01 CEST