Re: [ROOT] TFile & Geant4

From: Martin Weber (Martin.Weber@cern.ch)
Date: Mon Aug 14 2000 - 17:49:04 MEST


Hi,

I had this problem with ROOT version 2.21/02. It is because in "TFile.h"
the constructor "TFile::TFile" has one more const than in the code
(BASE_File.cxx). I simply added "const" in the source code --- and then
everything worked fine. In the new ROT versions, the include file and the
source code are the same. So the best thing to do is to use a newer
version of ROOT.

Martin


On Mon, 14 Aug 2000, Mark Polsen wrote:

> Hi All,
> 
> I'm trying to add some basic Histogramming to mt Geant4 application. I
> get an error when compiling from the line below when I try to create the
> file.
> 
> hfile = new TFile("hsimple.root","RECREATE","Demo ROOT file with
> histograms");
> 
> Here is the message from the compiler:
> 
> /usr/local/geant4/tmp/Linux-g++/geanttest/libgeanttest.a(UldbHistograms.o):
> In function `UldbHistograms::RecordBeginOfRun(G4Run const *)':
> UldbHistograms.o(.text+0xea): undefined reference to `TFile::TFile(char
> const *, char const *, char const *, int)'
> collect2: ld returned 1 exit status
> 
> I'm using ROOT v2.24 on Linux Mandrake 7.0 with Geant4 2.0.
> 
> All suggestions are helpful.
> 
> Mark
> 
> 



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