Using ROOT within the VLSI lab

[ Home ] [ Back ]

  • Introduction


Installation from binaries

Check dependences

  • subversion
  • make
  • gcc-c++
  • gcc
  • binutils
  • libX11-devel
  • libXpm-devel
  • libXft-devel
  • libXext-devel

Download the last stable version binary package from

tar -xvzf root_v5.xx.yy.zzzzzz.tar.gz
sudo mv root /opt
setenv ROOTSYS /opt/root

Accessing gcc/g++ from Cadence

The g++ compiler might not be installed on your VLSI lab machine! Nevertheless, you can use the GCC version which comes with a Cadence Incisive installation under


To use g++ you need to set up the UNIX environment as follows:

setenv INCISIV_DIR /usr/cadence/Incisive_13.10/
set incisivPath = ( $INCISIV_DIR/bin $INCISIV_DIR/tools/bin $INCISIV_DIR/tools/cdsgcc/gcc/bin )
set path = ( $incisivPath $path )

ROOT e' installato sulle macchine PHOINIX e BEDDU!

ssh -X

e poi basta fare il source dello scriptino che setta le variabili d'ambiente in


usare .sh oppure .csh a seconda della shell in uso (tcsh di default!)

source /opt/local+/profile.d/root.(c)sh

La main directory e'


In order to automatize the source at the startup cat and paste the following lines in your ~/.cshrc initialization file:

if ( -e /usr/local+/profile.d/root.csh )  then
   source /usr/local+/profile.d/root.csh

If you have a bash shell indeed edit the ~/.bashrc with

if [ -f /usr/local+/profile.d/ ] ; then
   source /usr/local+/profile.d/root.csh

At this point ROOT executables have been added to the search path. Start ROOT typing

root -l

ricordare che per customizzare il comportamento di root si possono creare nella HOME i files .rootrc rootlogon.C rootlogoff.C rootalias.C

# .rootrc file example 

##  rootlogon.C path
Rint.Logon: $HOME/rootlogon.C

##  rootlogoff.C path
Rint.Logoff: $HOME/rootlogoff.C

##  rootalias.C path
Rint.Load:   $HOME/rootalias.C

##  .root_hist number of lines
Rint.HistSize:   500
Rint.HistSave:   400

##  ROOT user macros path
# Unix.*.Root.MacroPath:    ./custom/path:$ROOTSYS/macros

##  tracking memory leaks
Root.MemStat:     1
Root.ObjectStat:  1

##   memory checker
Root.MemCheck:   1

Esempio di rootlogon.C

// ~/rootlogon.C file example

printf("Loading rootlogon.C script \n");

//  resets the CINT command line

// current .rootrc system environment

// namespace for TMath utilities
using namespace TMath;

// global "plain" style for plots

// histograms Stats Box content
// gStyle->SetOptStat(mode)
// mode = kurtosis, skewness, integral of bins, overflows, underflows, rms, mean, entries, name
// gStyle->SetOptStat()   default = 000001111
// gStyle->SetOptStat(0)  disables Stats Box

// fit paramenters box content

// RooFit library loading
using namespace RooFit;

Uso TGraph

$ root -l
root[] TGraph plot("waveform.csv","%lg , %lg")
root[] plot.SetMarkerStyle(21)
root[] plot.SetMarkerSize(0.7)
root[] plot.Draw("ALP")

Se ho families di curve uso un TMultiGraph e creo uno script:

   TGraph plot1("waveform.csv","%lg , %lg , %*lg ......);
   TGraph plot2("waveform.csv","%lg , %*lg , %lg ......);


   TMultiGraph mgr("mgr","");




Poi lo runno semplicemente come

root [] .x scriptName.cpp
$ root -l <fileName.root>
root [0] 
Attaching file <fileName.root> as _file0...
root [1] TBrowser b

Last update: Luca Pacher - Aug 20, 2013

  • vlsi/workbook/analysis/root.txt
  • Ultima modifica: 23/05/2014 09:48
  • da pacher