This is the LHCb-Edinburgh page on tips for using root

Tips for Using Root

Setting Root with CMT

The LHCb software includes several distributions of Root, among which you can find the one needed when submitting a Root job through Ganga. Without going into details on dealing with CMT (documentation), the following example should help with getting things the way you want:

  • with the LHCb software on, start by creating a new CMT project from your top directory:

cmt create_project lhcbRoot v1r0 cmtuser

where lhcbRoot is the project name, v1r0 is the version and cmtuser is a path. You should now get something like:

% ls cmtuser/lhcbRoot/v1r0/
cmt/
% ls cmtuser/lhcbRoot/v1r0/cmt/
project.cmt

  • edit the project.cmt file and add the lines:

use LCGCMT v*

this is telling CMT that you need the latest version of the package LCGCMT. Now create a requirements at the same place. In here, you are going to specify that from the lcg software area, get the environment for Root i.e. the variables ROOTSYS, PATH and LD_LIBRARY_PATH will point to the requested version. In this example, we want the latest version and some other packages found in the lcg software area:

package lhcbRoot
version v1r0

use ROOT          v* LCG_Interfaces
use Reflex         v* LCG_Interfaces -no_auto_imports
use gfal             v* LCG_Interfaces
use dcache_client v* LCG_Interfaces
use GSL            v* LCG_Interfaces

  • Now you can do cmt config and source setup.sh{csh}. The selected Root should now be ready for you.

NOTE for the system manager: unfortunately, because of the way CMT works, the environment variable CMTPROJECTPATH has to point to "/Disk/lochnagar/lhcb/lhcb-soft/lcg/externals". Therefore, I had to modify the local-setup.sh{csh} (+ the Condor version) scripts to add this definition. However, this breaks the setup for any other package like DaVinci and Ganga environment. The solution was to add a line in the corresponding scripts to "unset" this variable before any of the configuration steps.

Creating root jobs in Ganga

There is a nice tutorial here: HowToRootJobsSharedObject

Better colour schemes

The default colour scheme in Root is terrible. The following 2 lines fix this and should probably be in (the very beginning of) every Root macro that plots something:

gROOT->SetStyle("Plain")

gStyle->SetPalette(1)

  • The horrible default colour scheme for a ColZ plot:
    BadColourScheme.png

  • What the above 2 lines give you. Now the ColZ plot has sensible colours:
    GoodColourScheme.png

-- YoungMinKim - 12 Nov 2007

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng BadColourScheme.png r1 manage 31.9 K 2007-11-12 - 17:19 YoungMinKim Bad Colour Scheme - a horrible ColZ plot
PNGpng GoodColourScheme.png r1 manage 31.2 K 2007-11-12 - 17:20 YoungMinKim A logical colour scheme. Now the ColZ plot has sensible colours
Edit | Attach | Watch | Print version | History: r16 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2008-04-04 - unknown
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback