User Tools

Site Tools


database:database

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
database:database [2010/05/04 16:15] decianmdatabase:database [2012/05/29 20:13] (current) – [How to find the tag corresponding to a dataset] decianm
Line 1: Line 1:
 ====== Databases ====== ====== Databases ======
-===== How to make a snapshop of the online database =====+===== How to make a snapshot of the online database =====
 On lxplus, do: On lxplus, do:
  
Line 16: Line 16:
 ===== How to access the database in the options file ===== ===== How to access the database in the options file =====
 Do Do
-<code>+<code python>
 from Configurables import CondDB, CondDBAccessSvc from Configurables import CondDB, CondDBAccessSvc
 CondDB(UseOracle = False) CondDB(UseOracle = False)
-connection="sqlite_file:/afs/cern.ch/user/d/decianm/dbsnapshot/myFileName.db/ONLINE"+connection="sqlite_file:/afs/cern.ch/user/initial/name/mydatabase/myFileName.db/ONLINE"
 CondDB().addLayer(CondDBAccessSvc("DB",ConnectionString=connection)) CondDB().addLayer(CondDBAccessSvc("DB",ConnectionString=connection))
 </code> </code>
 +
 +===== How to use the latest tag =====
 +Do
 +<code python>
 +CondDB().UseLatestTags = ["2011"
 +</code>
 +if you want to use the latest tag for 2011 data. 
 +For **real data** it should always be safe to use the latest tag (this is **not** the case for MC)
 +
 +===== How to find the tag corresponding to a dataset =====
 +In the bookkeeping-browser: First click on ''Advanced Queries'', then navigate yourself to the production name (for example ''Stripping 17b'') and then right-click to get to ''More Information''. There you should be able to read of the database tags.
 +
 +===== Where to find the description of the official tags =====
 +Here: http://lhcb-release-area.web.cern.ch/LHCb-release-area/DOC/dbase/conddb/release_notes.html
database/database.1272982533.txt.gz · Last modified: 2010/05/04 16:15 by decianm