Skip to content

rmatev/ganga-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ganga-tools

Ganga tools and extensions for LHCb

Plugins (splitters, checkers, etc.)

LHCbCompleteChecker

A checker that ensures that all input files were fully processed (using the metadata). This is a simplified version of the existing LHCbMetaDataChecker, which also overcomes some deficiencies. This checker is not suitable if only part of the input is processed (e.g. EvtMax is used).

Use:

job.postprocessors.append(LHCbCompleteChecker())

LHCbBookkeepingChecker

A checker that compares the number of processed events as reported in the metadata and the number of events from the bookkeeping (EventStat/FullStat field). Fails if the processed and the expected number of events differ. This checker is not suitable if only part of the input is processed (e.g. EvtMax is used).

Use:

job.postprocessors.append(LHCbBookkeepingChecker())

SplitByFilesAndRun

A splitter that is similar to SplitByFiles but ensures that each subjob's input contains files from one run only. Expect many subjobs if using this splitter (at least as many as the number of runs)!

Use (see SplitByFiles):

job.splitter = SplitByFilesAndRun(filesPerJob=50)

Tools (scripts)

gdownload

Download job output files. Can also merge the downloaded files (ROOT only).

gdownload --help

gmerge

Merge job output files directly (w/o downloading). Currenly only ROOT files are supported.

gmerge --help

Utility functions

These are python modules with utility functions to be used from interactive Ganga shell or from scripts.

from gutils import utils, download, merge
help(utils)
help(download)
help(merge)

Setup instructions

First, clone the repository

git clone https://github.com/rmatev/ganga-tools.git ~/ganga-tools

Second, edit ~/.gangarc by uncommenting RUNTIME_PATH and appending the appropriate path, e.g.:

#RUNTIME_PATH = GangaDirac:GangaGaudi:GangaLHCb

becomes

RUNTIME_PATH = GangaDirac:GangaGaudi:GangaLHCb:~/ganga-tools/GangaLHCbExt

The default LHCb-specific value of RUNTIME_PATH can be found from

grep RUNTIME_PATH /cvmfs/ganga.cern.ch/Ganga/install/LATEST/lib/python3.6/site-packages/ganga/GangaLHCb/LHCb.in

Third, (optional) add ~/ganga-tools/scripts to the PATH environment variable, e.g. add in ~/.bashrc:

export PATH=$HOME/ganga-tools/scripts:$PATH

Optionally, increase the number of user threads (default to 3) by uncommenting and changing # NumWorkerThreads = 3 in ~/.gangarc

About

Ganga tools/extensions for LHCb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published