This is an old revision of the document!

ROOT Issues

Creating Dictionaries


  • You have a root file and you want to create a dictionary that you can load as a shared library. You followed the documentation in interacting-shared-libraries-rootcint but you failed to create that dictionary either manually or through ACLIC.


1) Enable the ATLAS environment

-bash-4.1$ setupATLAS

--- * ---

2) Enable your prefer root version. Some versions have problems in production header files (they introduce hard coded paths). 5.34.19-x86_64-slc6-gcc48-opt is know to work

-bash-4.1$ localSetupROOT 5.34.19-x86_64-slc6-gcc48-opt

--- * ---

3) Start root and create the PAR file from a known root file

$ root
root [0] TFile *f = TFile::Open("TauTauEventGeneration-evtgen.root")
Warning in <TClass::TClass>: no dictionary for class Belle2::EventMetaData is available
Warning in <TClass::TClass>: no dictionary for class Belle2::MCParticle is available
Warning in <TClass::TClass>: no dictionary for class Belle2::RelationsInterface<TObject> is available
Warning in <TClass::TClass>: no dictionary for class Belle2::Const::DetectorSet is available
Warning in <TClass::TClass>: no dictionary for class Belle2::FileMetaData is available
Warning in <TClass::TClass>: no dictionary for class Belle2::ProcessStatistics is available
Warning in <TClass::TClass>: no dictionary for class Belle2::Mergeable is available
Warning in <TClass::TClass>: no dictionary for class Belle2::ModuleStatistics is available
Warning in <TClass::TClass>: no dictionary for class Belle2::CalcMeanCov<2,float> is available

root [1] f->MakeProject("packages/TauTauEventGeneration-evtgen", "*", "par")
MakeProject has generated 9 classes in packages/TauTauEventGeneration-evtgen
Files Makefile, Makefile.arch, PROOF-INF/ and PROOF-INF/SETUP.C have been generated under 'packages/TauTauEventGeneration-evtgen'
Info in <TFile::MakeProject>: PAR file packages/TauTauEventGeneration-evtgen.par generated

--- * ---

4)  Exit root and check the project that has been created

-bash-4.1$ ls packages/
TauTauEventGeneration-evtgen  TauTauEventGeneration-evtgen.par

-bash-4.1$ ls -l packages
total 12
drwxr-xr-x 3 goncalo people 4096 May  6 06:54 TauTauEventGeneration-evtgen
-rw-r--r-- 1 goncalo people 7486 May  6 06:54 TauTauEventGeneration-evtgen.par

-bash-4.1$ ls -l packages/TauTauEventGeneration-evtgen
total 76
-rw-r--r-- 1 goncalo people  1016 May  6 06:54 Belle2__CalcMeanCov_2_float_.h
-rw-r--r-- 1 goncalo people   847 May  6 06:54 Belle2__Const__DetectorSet.h
-rw-r--r-- 1 goncalo people  1124 May  6 06:54 Belle2__EventMetaData.h
-rw-r--r-- 1 goncalo people  1764 May  6 06:54 Belle2__FileMetaData.h
-rw-r--r-- 1 goncalo people  2665 May  6 06:54 Belle2__MCParticle.h
-rw-r--r-- 1 goncalo people   818 May  6 06:54 Belle2__Mergeable.h
-rw-r--r-- 1 goncalo people   880 May  6 06:54 Belle2__ModuleStatistics.h
-rw-r--r-- 1 goncalo people  1016 May  6 06:54 Belle2__ProcessStatistics.h
-rw-r--r-- 1 goncalo people  1072 May  6 06:54 Belle2__RelationsInterface_TObject_.h
-rw-r--r-- 1 goncalo people  2471 May  6 06:54 Makefile
-rw-r--r-- 1 goncalo people 12571 May  6 06:54 Makefile.arch
drwxr-xr-x 2 goncalo people    35 May  6 06:54 PROOF-INF
-rw-r--r-- 1 goncalo people   609 May  6 06:54 TauTauEventGeneration-evtgenLinkDef.h
-rw-r--r-- 1 goncalo people   398 May  6 06:54 TauTauEventGeneration-evtgenProjectHeaders.h
-rw-r--r-- 1 goncalo people     0 May  6 06:54 TauTauEventGeneration-evtgenProjectInstances.h
-rw-r--r-- 1 goncalo people  9239 May  6 06:54 TauTauEventGeneration-evtgenProjectSource.cxx

---* ---

5) Generate you dictionary running 'make'

-bash-4.1$ packages/TauTauEventGeneration-evtgen

-bash-4.1$ make
Generating dictionary TauTauEventGeneration-evtgenProjectDict.cxx...
g++ -O2 -Wall -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -m64 -I/cvmfs/ -c TauTauEventGeneration-evtgenProjectSource.cxx
g++ -shared -O2 -m64 TauTauEventGeneration-evtgenProjectSource.o -o -L/cvmfs/ -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic done

--- * ---

6) Now you are able to use that dictionary as a shared library, and even, load it ROOT

-bash-4.1$ cd ../..

-bash-4.1$ root
root [0] gSystem->Load("packages/TauTauEventGeneration-evtgen/")

segmentation violation


[user@agu1] $ . setupATLAS
[user@agu1] $ asetup 17.3.0
[user@agu1] $ root
Fatal in <TROOT::InitSystem>: HOME directory not set

*** Break *** segmentation violation
[user@agu1] $
  • Problem is caused by old version of root not respecting proper Name Service databases
    • We use a central LDAP network passwd database not /etc/passwd. This old version of root crashes when the user isn't in the actual /etc/passwd file.


  • use a different version of root: ie 17.5.0
    [user@agu1] $ . setupATLAS
    [user@agu1] $ asetup 17.5.0
    [user@agu1] $ root
  • Another less preferred option is to ask Sean or Lucien to add your username to the the actual /etc/passwd file.

root version error


  • When running root code after changing configs or versions sometimes you will see these errors:
    Error in : version mismatch, /cvmfs/ = 53200, ROOT = 53404
    Error in : failure loading library libGaudiPythonDict for class basic_ostream >
    Error in : version mismatch, /cvmfs/ = 53200, ROOT = 53404
    Error in : failure loading library for class type_info
  • The error is caused by the *.so file having been compiled against a different version of root (see 53200 in code output above).


  • Delete all the old *.so files in your working directory. They are derived files and will be recreated from source code when you try to run it again.

Bad EPS files using Tau Channel Common framework


  • Although no errors are produced running them, the graphing routines produce large .eps files of grabage.


  • use a specific version of root: ie
    [user@agu1] $ . setupATLAS
    [user@agu1] $ asetup
tier3/faq/root.1449097885.txt.gz · Last modified: 2015/12/03 10:11 by scrosby
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki