Re: TTree and GetV1, limit in number of entries

From: Andrea Massironi <Andrea.Massironi_at_cern.ch>
Date: Fri, 2 Dec 2011 19:14:16 +0100


Sorry for the spam.

Answer found:

    http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=3419

thanks,

     Andrea

On 12/02/2011 07:01 PM, Andrea Massironi wrote:
> Dear ROOTers,
>
> I have a problem with the use of the method "GetV1()" of the class
> TTree.
> It seems that it returns at most 1M entries.
>
> Example code:
>
> TTree tree("tree","tree");
> double var1;
> tree.Branch("var1",&var1,"var1/D");
>
> for (int i=0; i<3000000; i++){ var1 = 1.; tree.Fill();}
>
> tree.Draw("var1","","goff");
> Double_t *vect1 = tree.GetV1();
>
> int nEntries = tree.GetEntries();
> for (int iEntry = 0; iEntry<nEntries; iEntry++){
> if (!(iEntry%100000)) {
> std::cout << "v1[" << iEntry << "] = " << vect1[iEntry] << "
> --- " << std::endl ;
> }
> }
>
>
>
> Output:
>
> v1[0] = 1 ---
> v1[100000] = 1 ---
> ...
> v1[900000] = 1 ---
> v1[1000000] = 0 ---
> v1[1100000] = 5.94459e-312 ---
> v1[1200000] = 3.63742e+233 ---
> *** Break *** segmentation violation
>
>
>
> Is there a workaround to deal with this apparent limitation?
>
> Thanks,
> Andrea
>
>
>
Received on Fri Dec 02 2011 - 19:13:47 CET

This archive was generated by hypermail 2.2.0 : Sun Dec 04 2011 - 11:50:02 CET