Summary of ATLAS database access documentation

Accessing COOL DB

The easiest way of dumping information from the COOL DB is to use AtlCoolCopy. You have to set up athena for this purpose.

Example from https://twiki.cern.ch/twiki/bin/view/Atlas/AtlCoolCopy AtlCoolCopy manual:

AtlCoolCopy.exe "COOLOFL_DCS/COMP200" dcsana.root -ana 0.1 -folder /TRT/DCS/HV/BARREL -ts 2008-08-08:00:00:00 -tu 2008-08-09:00:00:00

Analyses the contents of the folder /TRT/DCS/HV/BARREL on the ATLAS_COOLOFL_DCS schema in the COMP200 database, looking at 24 hours of data beginning at midnight UTC on 8th August 2008. The command prints the number of channels in the folder, together with the total number of objects read and the number of distinct IOV starts found (this obviously depends on the <delta_t> tolerance parameter).

Command used in CoolDCSAna.py (see http://atlas-sw.cern.ch/cgi-bin/viewcvs-atlas.cgi/groups/Database/CondDBTools/nighttasks/scripts/):

comm='AtlCoolCopy.exe "COOLOFL_DCS/COMP200" %s -ana 0.1 -ts %i -tu %i' % (self.rootfilename,self.startiov,self.endiov)

which should result in a command like this (to check database from 14/12/2009 20:00:00 - 23:59:59):

AtlCoolCopy.exe "COOLOFL_DCS/COMP200" `pwd`/dcsana.root -ana 0.1 -ts 1260558000 -tu 1260572399

To get the time in Unix format do:

date +"%s" -d "Sat Dec 11 20:00:00 CET 2009"
date +"%s" -d "Sat Dec 11 23:59:59 CET 2009"

To have only the Pixel DCS stuff copied, do:

AtlCoolCopy.exe "COOLOFL_DCS/COMP200" `pwd`/pixdcsana.root -ana 0.1 -folder /PIXEL/DCS -ts 1260558000 -tu 1260572399

If you don't want the IOV analysis but all information to be dumped, do:

AtlCoolCopy.exe "COOLOFL_DCS/COMP200" pixdcs.root -root -folder /PIXEL/DCS -ts 1260558000-tu 1260572399

Accessing Oracle DB

==== Query string by Dominic ===

Paste into a file (here query.sql)

SELECT elem.element_name, hist.ts, hist.value_number
FROM atlas_pvsspix.EVENTHISTORY_00000016 hist, atlas_pvsspix.ELEMENTS elem
WHERE elem.element_id=hist.element_id
AND element_name LIKE 'ATLPIXLCS6%Ch01%VMeas'
AND hist.ts BETWEEN to_date('11-12-2009 20:00:00', 'DD-MM-YYYY HH24:MI:SS')
AND to_date('11-12-2009 23:59:59', 'DD-MM-YYYY HH24:MI:SS')

If you are looking at fsm states, change the first line to:

SELECT elem.element_name, hist.ts, hist.value_string

If you would like to list all columns of the atlas_pvsspix.EVENTHISTORY_00000016 database, do:

SELECT elem.element_name, hist.*

Then execute via:

sqlplus atlas_pvss_reader/passws@atlas_pvssprod @getvalues.sql

obsolete stuff

And now comes the test trying to access the Oracle Offline Database (using Sascha's database names and login information): DOES NOT WORK

AtlCoolCopy.exe "oracle://atlr.cern.ch/ATLR;schema=ATLAS_COOLOFL_DCS;dbname=COMP200;user=ATLAS_PVSS_READER;pass=PASSWD" `pwd`/dcsoffl.root -ana 0.1 -ts 1264114800 -tu 1264118400

This here works, but that doesn't seem to be the right database (found https://twiki.cern.ch/twiki/bin/view/Atlas/PixelDCSCondDB):

AtlCoolCopy.exe "oracle://ATLAS_COOLPROD;schema=ATLAS_COOLOFL_DCS;dbname=COMP200;user=ATLAS_COOL_READER" test.root -ana 0.1 -ts 1264114800 -tu 1264118400


CategoryDCSProject

ATLAS: ClemensLange/PixelDCS/DatabaseAccess (last edited 2018-05-18 09:29:28 by ClemensLange)