SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

How to Make Use of Kanga Index Collections using 11.12.1 or later

What is an index collection?

A Kanga index collection is a file containing a set of pointers to events which themselves reside in other Kanga event files. Index collections can be used to skim the Kanga allevents collections (in analogy to objectivity skims).

How to write an index collection?

When building a test release of 11.12.1 to write index collections, you also have to check out the following tag of RooModules:

 addpkg RooModules V00-00-52

Please set up a tag or micro filter job as usual. Then edit your AppUserBuild.cc and add the following line in the constructor function of AppUserBuild:

 add( new RooEventOutput ( "RooEventOutput", "Write an index collection.") );

Now hook up this module in your tcl path. If you are using myAnalsys.tcl you would need to add the following:

 sequence append MyAnalysis RooEventOutput

In your kanga.tcl you need to set:

 module enable RooEventOutput

Important: the skimEvent parameter must be set to true when using index collections, i.e. in your kanga.tcl do:

 mod talk RooEventOutput
  skimEvent set true
 exit

The default name for the index collection file is default-skim.root. You can change the name by talking to RooEventOutput:

 mod talk RooEventOutput
   filename set mySelection-skim.root
 exit

Note: The file name must end with -skim.root !

How to use an index collection as input to a Beta job?

Add the collection to your RooEventInput in the same way as a regular Kanga file:

 mod talk RooEventInput
   input add ~/mySelection1-skim
   input add ~/mySelection2-skim
   input add ~/mySelection3-skim
 exit

Note: The file names must include the extension "-skim" but not ".root".

Utilities

The Kanga event store usually contains only the latest reprocessing of each event. This means that superceded data will be deleted after some period of time. The RooSkimUtil utility allows one to check if all Kanga files which are referenced by an index collection still exist. You should run this utility before running your Beta job to make sure that your jobs will succeed.
The syntax for doing this is

 RooSkimUtil -c ~/mySelection*-skim.root

The example illustrates that one can use wildcards or pass several files to the utility. The result will be a list of missing kanga files. If all files are present the result will be empty. The utility offers some more functionality. RooSkimUtil -h displays the following:

Utility for Inspecting and Manipulating Kanga Index Collections

USAGE
  RooSkimUtil <options> <list of files>
  <list of files> can be kanga index collections or tcl files (which follow the standard
  syntax for adding kanga index collections to a RooEventInput module).

OPTIONS
  -b  specify a base directory name (used with option -c). Default is $BFROOT/kanga/EventStore.
  -c  print a list of missing kanga files (prints nothing if all are present)
  -e  print the event id for all events
  -h  display this help text
  -k  print the names of all kanga files which are referred to by the specified index collection(s)
  -m  merge index collections; >=3 arguments required:
      the name of the new merged collection first
  -n  print the total number of events in the specified index collection(s)
  -p  print all contents of index collection(s) in ascii format
  -v  display this utilitie's version number



This page is maintained by Tilmann Colberg.
Last significant update July 05 2002.