Ganga tools and extensions for LHCb
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())
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())
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)
Download job output files. Can also merge the downloaded files (ROOT only).
gdownload --help
Merge job output files directly (w/o downloading). Currenly only ROOT files are supported.
gmerge --help
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)
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