Problem 1488 - Error viewing 2D histograms in Root
Summary: Error viewing 2D histograms in Root
Status: RESOLVED FIXED
Alias: None
Product: Examples/Extended
Classification: Unclassified
Component: eventgenerator/exgps (show other problems)
Version: 9.6
Hardware: All Linux
: P5 minor
Assignee: Sebastien Incerti
URL:
Depends on:
Blocks:
 
Reported: 2013-07-09 20:03 CEST by Evan
Modified: 2013-08-25 17:03 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Evan 2013-07-09 20:03:53 CEST
Hello,

I am running Geant4.9.6.p01 (64bit) in Scientific Linux 5.8 on a vmware virtual machine provided by IN2P3 (http://geant4.in2p3.fr/spip.php?rubrique8&lang=en)

The bug I found relates to viewing 2D histograms in Root. I have this problem in my own work, but it is easier to show the same issue in one of the Geant4 examples. Take a look at the Geant4 example exGPS (/usr/local/geant4.9.6.p01/examples/extended/eventgenerator/exgps). If you compile it and run the first sample macro file (test1.g4mac) and try to view the resulting root file (test1.root), the 1D histograms plot correctly in Root, but none of the 2D histograms are plotted in the canvas. An error message like the following is output in the terminal,

Error in <TBufferFile::ReadClassBuffer>: Could not find the StreamerInfo for version 3 of the class TH2, object skipped at offset 83.

Could this be an error in Root? Perhaps this version of root is not compatible with Geant4? I am running Root version 5.34/03.

Thanks,
Evan
Comment 1 Gabriele Cosmo 2013-07-16 12:17:12 CEST
Looks like a library mismatch. Assigning to responsible in in2p3...
Comment 2 Michael Kelsey 2013-08-05 20:08:04 CEST
As Gabriele Cosmo noted, your error is due to a ROOT version mismatch.  The version of ROOT you used when compiling and linking your application is more recent than the version you are launching to view the resulting output.

This is a user environment issue, not Geant4 nor ROOT.  To resolve it, look at the envvars PATH, LD_LIBRARY_PATH, and ROOTSYS.  The first two should both include a directory path to the _same_ ROOT version referenced in the last one.  On my system (MacOS), I have:

% echo $PATH
/usr/local/ROOT/5.30-04/bin:/Users/kelsey/geant4_workdir/bin/Darwin-g++: [...]
$ echo $DYLD_LIBRARY_PATH
/usr/local/ROOT/5.30-04/lib:/Users/kelsey/geant4/g4_SVN/geant4.9.6/lib: [...]
% echo $ROOTSYS
/usr/local/ROOT/5.30-04

You will probably find that in your PATH and LD_LIBRARY_PATH variables, you are referencing different versions, or that you maybe have two versions is each path, but in different order.
Comment 3 Sebastien Incerti 2013-08-25 17:03:17 CEST
Request taken into account; the VMware machine contains ROOT version 5.34.03.