Bookkeeping Recipes
The official documentation is at in the
bookkeeping area. The most useful is the summary of the user tools.
Making Bbk tools work
The bookkeeping tools are now all part of the default release just run:
BbkDatasetTcl etc. from any BaBar node.
Listing available datasets
Use the command
BbkDatasetHistory
to list the currently defined datasets (this is a very long list).
Making TCL files to access datasets
BbkDatasetTcl AllEventsSkim-Run4-OnPeak-R14
makes the file AllEventsSkim-Run4-OnPeak-R14.tcl with each AllEvents collection for every good run in Run4 listed.
Use the --help for BbkDatasetTcl to get the full list of options.
General access to the Bookkeeping tables
The command BbkUser is the general way to access the bookkeeping
tables, it can list any column from any of the tables and creates the
appropriate joins. It does not check that the runs have been declared
good by the RQM and should be used with care.
Getting specific run ranges from a dataset
Short answer: don't!
Long answer: if you need a condition alias then you can use that as the
--condalias option to BbkExpertTcl. For general complex queries
Splitting tcl files up into exact number of events per file
Often your require exact control over the number of events in each
tcl file as job need to run within a certain CPU time limit. To do this use
the split runs option for the BbkDatasetTcl file:
BbkDatasetTcl -t 10000 -ds SP-1442 --splitruns
which splits the SP dataset SP-1442 into 37 tcl files called
SP-1442-1.tcl etc.
Warning:
Each tcl file has the form
...
# 150153/7421040 events selected from 57 on-peak runs, added to dataset at 2004/04/20 22:35:33, lumi = ~0.0/pb
lappend inputList /store/PRskims/R12/14.4.0c/XSLBtoXulnuFilter/02/XSLBtoXulnuFilter_0279%selectEventSequence=127754-137753
...
you must include this file before the TCL file with the line
ev begin (for example in MyMiniAnalysis.tcl).
Getting the luminsoity and number of B pairs in a dataset
lumi -B -ds InclEta-Run1-OnPeak-R14
or the luminosity of a TCL file (NOTE this works on whole runs only,
if you used the --splitruns options be very careful not to double count
runs)
BbkLumi -B --tcl InclEta-Run1-OnPeak-R14.tcl
Maintained by
David Hutchcroft
(650-926-2432,ROB-rm 253),
Last updated: August 3rd, 2004.
|