You are here: TWiki> Online Web>RunDataBase (2015-02-26, AlexPearce)
Tags:
create new tag
, view all tags

The Run-Database (RDB)

The run-database contains metadata about run and fills recorded by LHCb. Plenty of information is available, which is mostly useful to verify what was known about these data when they were recorded. For physics analysis purposes you should use the Bookkeeping database.

Maintainers:

The Rundatabase is maintained by the LHCb Online sys-admin team. If you have a question or feature request please send a mail to the helpdesk

There are three ways to access the run-database

The Run-Database web-interface

This is the recommended way for all users. RundatabaseWeb

An explanation of the individual items can be found here

The Run-Database commandline tool

rdbt is located in /group/online/scripts/. This is in your standard path in the Online environment. Usage information can be obtained by doing

rdbt --help

The Run-Database Python API

For people who need access to the Run-Database from a program, and who do not want to parse the output of rdbt a simple API is provided. To use it do something like this

export PYTHONPATH=/group/online/rundb/RunDatabase/python:$PYTHONPATH   # note: do not overwrite your PYTHONPATH! just append!
python
import rundb
db=rundb.RunDB()
db.getrun(runid)

This will only work on machines in the Online cluster. There is not much documentation yet and there are only three public functions

  • getrun(runid) returns a tuple of a dictionaries with run parameters and a dictionary of one dictionary per stream counters for this run summed over all files. If this sounds complicated, I suggest you simpy print it once, it is actually very simple to use and very flexible
  • getruns(fillid) returns a list of runids belonging to a fill
  • get_fill_info(fillid) returns a list of fill parameters with the following meaning [ 'fill_id', 'time_total', 'time_hvon', 'time_veloin', 'time_running', 'time_logged', 'lumi_total', 'lumi_hvon', 'lumi_veloin', 'lumi_running', 'lumi_logged']
Feature requests & suggestions should go to the RunDBWishList

Explanation of RunDB items

events number of events
physstat events which have bit 34 set in the RoutingBits External link mark Everything from HLT1 that does not have Lumi in the decision i.e. no nano-events
n_physics_inc events which have bit 77 set in the RoutingBits External link mark (accepted by HLT2)
n_physics_ex events which have bit 77 and not (bit 47 or bit 33 or bit 49) set in the RoutingBits External link mark
n_minbias_inc events which have bit 47 set in the RoutingBits External link mark
n_minbias_ex events which have bit 47 and not (bit 77 or bit 33 or bit 49) set in the RoutingBits External link mark
n_lumi_inc events which have bit 33 set in the RoutingBits External link mark
n_lumi_ex events which have bit 33 and not (bit 77 or bit 47 or bit 49) set in the RoutingBits External link mark
n_beamgas_inc events which have bit 49 set in the RoutingBits External link mark
n_beamgas_ex events which have bit 49 and not (bit 77 or bit 33 or bit 47) set in the RoutingBits External link mark
n_other_inc events which have not (bit 77 or bit 33 or bit 47 or bit 49) set in the RoutingBits External link mark
n_other_ex events which have not (bit 77 or bit 33 or bit 47 or bit 49) set in the RoutingBits External link mark (for consistency ...)
n_lumi_low events which have bit 50 set in the RoutingBits External link mark
n_lumi_high events which have bit 51 set in the RoutingBits External link mark
nevent_0  
nevent_i  
nevent_7  

JSON interface

Runs

The easiest is to look at an example

$ curl http://lbrundb.cern.ch/api/run/103515/

results in the following

{  
   "beamenergy":3500.0,
   "LHCState":"PHYSICS",
   "prev_runid":103514,
   "programVersion":"v12r9p1",
   "avLumi":"359.24051333332",
   "runid":103515,
   "veloPosition":"Closed",
   "endtime":"2011-10-15T20:48:56",
   "betaStar":"3",
   "destination":"OFFLINE",
   "veloOpening":"-0.00045204162597656",
   "state":"IN BKK",
   "program":"Moore",
   "avHltPhysRate":"3205.3882852703",
   "partitionid":32767,
   "starttime":"2011-10-15T19:54:01",
   "magnetCurrent":"-5850",
   "runtype":"COLLISION11",
   "avL0PhysRate":"816732.75292916",
   "avMu":"1.4500368323385",
   "avPhysDeadTime":"3.6540410003456",
   "magnetState":"DOWN",
   "next_runid":103523,
   "partitionname":"LHCb",
   "tck":"7929912"
}

-- Main.niko -

05 Nov 2010

Edit | Attach | PDF version | Print version |  | Raw View | Raw edit | Backlinks | History: r8 < r7 < r6 < r5 < r4 | More topic actions
Topic revision: r8 - 2015-02-26 - AlexPearce
 

TWIKI.NET
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.
Ideas, requests, problems regarding TWiki? Send feedback