Re: [ROOT] Bug in star/inc/TTable.h and star/src/TTable.cxx

From: Valeri Fine (Faine) (fine@bnl.gov)
Date: Sat Sep 23 2000 - 00:24:06 MEST


Hi, Rene, Chistian

I've found the problem is caused by method ReadGenericArray
This method is no use and it MUST be deleted from that class.TTable and TChair.
Very liklely I missed it (since it is used by nobody)  preparing TTable for ROOT.

 What about TDataSet(TNode &) method.
 This should not impose any dependence between TNode and TDataSet since
 the implementation looks as follows

  TDataSet::TDataSet(TNode &){ assert(0);}

 This means to solve the problem one needs to replace

 #include "TNode.h"

with

  class TNode;

  That is.

  Thank you
                  Valery



> Hi ROOT'ers (I guess in particular René Brun, Fons Rademarkers, and
> Valeri Fine),
>
> There seems to be a bug in star/inc/TTable.h and star/src/TTable.cxx.
>
> When I try to compile this class on Digital Unix (OSF1 V4.0 alpha)
> with GCC 2.91.66 (EGCS 1.1.2), it complains about the lines 1181 and
> 1183 in star/src/TTable.cxx. I've tracked it down to the fact that in
> a switch expression, the following two (redundant) case statements
> appears:
>
>   case kLong4Bytes:
>   case kDouble8Bytes:
>
> where the definitions of kLong4Bytes and kDouble8Bytes in
> star/inc/TTable.h is:
>
>   kLong4Bytes   = sizeof(Long_t)
>   kDouble8Bytes = sizeof(Double_t)
>
> which both evaluates to 8 on Digital Unix on a Alpha chip. For the
> record: kLong4Bytes is 4, and kDouble8Bytes is 8 on Linux (Redhat
> 6.1). This strikes me as somewhat odd, since I thought the idea of
> Long_t was to have a OS independt size for long's (i.e., either 4 or 8
> bytes).
>
> Thought you'd like to know.
>
> Christian  -----------------------------------------------------------
> Holm Christensen                             Phone:  (+45) 35 35 96 91
>   Sankt Hansgade 23, 1. th.                  Office: (+45) 353  25 305
>   DK-2200 Copenhagen N                       Web:    www.nbi.dk/~cholm
>   Denmark                                    Email:       cholm@nbi.dk
>
>



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:33 MET