Minor BRAT changes

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Tue Jul 10 2001 - 07:03:45 EDT

  • Next message: Jens Ivar Jordre: "Re: BROP-1-0-1 and something must be wrong here......."

    Hi all (in particular Peter), 
    
    I've changed the BrTpcCluster::Print method so that it's truely
    const.  The problem was, that in Print, the non-const methods
    GetNpads() and so on, was called.  This is not allowed by ANSI C++.
    The pointer 'this' to the current object must be understood as const
    in a const method.  Sending non-const messages is therefore not
    allowed.  
    
    The above was not caught by the EGCS 1.1.2 C++ compiler (the standard
    on Redhat 6.2) but was caught by GCC 2.95.2 on my own Debian GNU/Linux
    2.2 machine.  We can probably expect similar things to pop up when we
    start using GCC 3.0 - the most standard compliant C++ compiler on the
    market. 
    
    To make sure that the user is aware of wether the cluster is build or
    not, additional output was added.  
    
    BrTpcCluster had the member kBuild.  This was a direct violation of
    the coding standard in BRAT/ROOT, since kBuild is not a constant and
    hence should have an 'f' as the first letter, not 'k' which is
    reserved for konstants (intentionally misspelled).  
    
    Consequently, the class version was bumped to 3.  Let me stress this
    point again: When changing _any_ member in a persistent class (class
    version > 0) the class version _must_ be bumped one.
    
    I had in fact made these changes in revision 1.2 of BrTpcCluster, but
    I guess that Peter overwrote those by submitting a non-up-to-date
    modified version of the class.  Please update your working directory,
    and possible resolve conflicts, before submitting to the CVS. 
    
    Yours, 
    
    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 2b30 : Tue Jul 10 2001 - 07:04:44 EDT