Hi Christian, When linking Geant4 with the Root libs, make sure to not link with libNew, libThread and the pthread libraries. I also suggest moving to the PRO version of ROOT or newer. Rene Brun Christian.Doerr@mpi-hd.mpg.de wrote: > > Hello again, > > today I have another problem with my Event class, here is the header file: > > -------------------------------------------------------- > > #ifndef BBRootEvent_h > #define BBRootEvent_h 1 > > // Include files for ROOT. > #include "Rtypes.h" > #include "TObject.h" > #include "TString.h" > > class BBRootEvent : public TObject > { > private: > TString fStartVolumeName; > //... > > public: > BBRootEvent(); > virtual ~BBRootEvent(); > //... > > ClassDef(BBRootEvent,1) //BBRootClass > }; > #endif > ---------------------------------------------------------- > > The problem arises when calling the constructor in BBRootEvent.cc: > > ---------------------------------------------------------- > #include "BBRootEvent.hh" > #include <iostream.h> > > // Include files for ROOT. > #include "Rtypes.h" > #include "TObject.h" > #include "TString.h" > > ClassImp(BBRootEvent) > > BBRootEvent::BBRootEvent() > { > //... > fStartVolumeName = "no_name"; > } > > ----------------------------------------------------------- > > After compiling it with geant4 and running the program with a debugger, I > get the information: > > (gdb) run > [New Thread 1024 (LWP 624)] > ********************************************** > Geant4 version $Name: geant4-04-00 $ > (14-Dec-2001) > Copyright : Geant4 Collaboration > ********************************************** > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 1024 (LWP 624)] > 0x401053fe in TString::operator= () from /cern/root/lib/libCore.so > ... > > caused by: fStartVolumeName = "no_name"; > in the constructor. Does anyone know what the problem with TString might > be here? > > Thanks for any suggestions! > > cheers, Chrisitan > > PS: I'm using Root version 3.01/06 and Geant4 4.0 > under SuSE Linux 7.3 with gcc version 2.95.3 > > ----------------------------------------------------------- > Christian Doerr > Max-Planck-Institut fuer Kernphysik, Heidelberg > Bothe-Labor, room 232 phone: +49-6221-516-259 > email: C.Doerr@mpi-hd.mpg.de www.christiandoerr.de > -----------------------------------------------------------
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET