Re: [Brahms-dev-l] Saving BrDetectorVolumes

From: Christian Holm Christensen <cholm@nbi.dk>
Date: Thu Oct 28 2004 - 07:53:24 EDT
Hi Claus, 

On Thu, 2004-10-28 at 13:14 +0200, Claus O. E. Jorgensen wrote:
> Hi,
> 
> I'd like to save a BrDetectorVolume in a file. This is no problem, but if
> I want to load it again I get a segmentation fault. I suspect that it has
> to do with the members that are pointers (which handles the MySQL data
> access, fRunDb, fGeometryDb...). If I make these member non-persistent, I
> can save and load without problems.

You should figure out the answers to these questions: 

     1. Are proper operation of the BrDetectorVolume objects contingent
        on these pointers being set?  
     2. Does all class assume that the pointers are set (that is, does
        it check `if(fRunDb)', `if (fGeomtryDb)', etc. before using the
        pointers?  
     3. Can you safely set these pointers in the default constructor? 
     4. Are the pointers (and other data members) properly initialised
        on the default constructor?

and then you should fix what ever problems there might be. 

> The question is if this can create other problems (I wouldn't think so).
> If there are no objections I'll commit the BrDetectorVolume.h with a
> couple of !'s next week.

I think it's OK, as long as you remember to increment the class version.
You should also check how the class is specified in the corresponding
LinkDef file - in particular if it has a `+' after it.  If it has, no
problem.   If not, you should probably add it (but read the ROOT manual
first!).  If there's no `+', try first if it works (and read the ROOT
manual!). 

Yours,

-- 
 ___  |  Christian Holm Christensen 
  |_| |  -------------------------------------------------------------
    | |  Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
     _|           DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    _|            Denmark                    Office: (+45) 353  25 404
 ____|   Email:   cholm@nbi.dk               Web:    www.nbi.dk/~cholm
 | |


_______________________________________________
Brahms-dev-l mailing list
Brahms-dev-l@lists.bnl.gov
http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
Received on Thu Oct 28 07:52:56 2004

This archive was generated by hypermail 2.1.8 : Thu Oct 28 2004 - 07:53:12 EDT