Re: [ROOT] TTree::GetEntry crashing

From: Carlos Muņoz Camacho (cmunoz@clipper.ens.fr)
Date: Mon Nov 08 2004 - 06:02:25 MET


The problem is that I get my crash when doing TTree::GetEntry, so I cannot
test what it retuns. I was just wondering I could use some other method to
test the event _before_ doing GetEntry, but maybe this is simply not
possible.

By the way, I also get messages like the one below which I think indicate
some corrupted event. I would simply like to skip them...

Carlos

Warning in <TBasket::ReadBasketBuffers>: basket:event_calo.fARSWaves.fWave
has fNevBuf=1, but fEntryOffset=0, trying to repair
Error in <TBuffer::CheckByteCount>: object of class TDoubleArray read too
few bytes: 20 instead of 10486784
Error in <TBuffer::CheckByteCount>: Byte count probably corrupted around
buffer position 54586:
        10486784 for a possible maximum of 83828



On Sun, 7 Nov 2004, Rene Brun wrote:

>Hi Carlos,
>
>This message is printed when a Tree buffer is corrupted. This may be due
>to several causes
>   -corrupted file
>   -network problem when reading a remote file
>   -basket compression problems with some old versions of ROOT.
>
>In principle, for these cases, you can detect a bad read by testing the
>number of bytes returned by TTree::getEntry or TBranch::GetEntry.
>If null or negative, this corresponds to a read error.
>
>Rene Brun
>
>On
>Sun, 7 Nov 2004, Carlos Muņoz Camacho wrote:
>
>>
>> Hi,
>>
>>    I have some events in my root file that for some reason (which I don't
>> might want to find out if possible) crash when I do tree->GetEntry to read
>> them. I would be happy if I could just skip them, as there are only a few
>> of them, so that my program could keep running. Is there a way to test the
>> event is good before getting the tree entry? This is the kind of message
>> I'm getting before crashing
>>
>> R__unzip: error during decompression
>> Error in <TBasket::ReadBasketBuffers>: fNbytes = 18571, fKeylen = 88,
>> fObjlen = 104812, noutot = 0, nout=0, nin=18483, nbuf=104812
>> Error in <TBranchElement::GetBasket>: File:
>> /work/halla/dvcs/disk2/cosmpa/dvcs_4139_33.root at byte:306243284,
>> branch:(null), entry:167482972
>>
>> Thanks!
>>
>> Carlos
>>
>> This is ROOT 4.00/08, gcc 3.2.3, on a Linux box.
>>
>>



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET