17
2011-02- 15 Seweryn Kowalski Database for NA61 experiment Nuclear Physics Department Institute of Physics University of Silesia

Database for NA61 experiment

Embed Size (px)

DESCRIPTION

Nuclear Physics Department Institute of Physics University of Silesia. Seweryn Kowalski. Database for NA61 experiment. 2011-02-15. Database status. Database divide into two pieces: My SQL /ORACLE(test) DSPACK Installation inside CERN lxplus cluster: na49db.cern.ch - PowerPoint PPT Presentation

Citation preview

Page 1: Database for NA61 experiment

2011-02-15

Seweryn Kowalski

Database for NA61 experimentDatabase for NA61 experiment

Nuclear Physics DepartmentInstitute of PhysicsUniversity of Silesia

Page 2: Database for NA61 experiment

Database statusDatabase status

Database divide into two pieces: MySQL/ORACLE(test) DSPACK

Installation inside CERN lxplus cluster: na49db.cern.ch Access only from CERN Oracle devdb10

2

MySQL/ORACLE

DSPACK FILES

NA61 SOFT

KEY1,.., KEYN

FILENAME

FILENAMEDSPACK STRUCTURE

DSPACK FILE

Page 3: Database for NA61 experiment

Database statusDatabase status

3

Possible installation outside CERN Local installation installation on CernVM XML version Backup MySQL server –

Katowice NUPH Cluster

Version in DB: Possible to set default version Different version for various

structures

Client side calls from shell scripts, plug-in system for DSSERVER $NA49_ROOT/SCRIPTS/src/

MySQL/Oracle

NA61 SOFTDSPACK FILES

KEY1,.., KEYN

FILENAME

LXPLUS, LXBATCH NA61PC??OUTSIDE

Page 4: Database for NA61 experiment

DB cache area on AFSDB cache area on AFS

New place for .ds files /afs/cern.ch/na61/DB/ Cron job – synchronization between na49db and AFS directory (once per day

1:07)

Modification of the hepdb.plugin Lxplus, lxbatch, na61pc – no local cache files (afs) Other host: cache file in ./hepdb directory Plug-in tested and committed to SVN

Backup MySQL DB on h041.nuph.us.edu.pl Works only with new hepdb.plugin NA49_DBHOST=h041.nuph.us.edu.pl

4

Page 5: Database for NA61 experiment

DB UpdateDB Update

TPC calibration constants for 2009 runs: 7124-20000 New default KEY10=V09C VTPC done, MTPC not yet (contact Alexander)

T0 in DB Data in calibration file, CODE=CA New structures:

• struct t0_det {float_t dt0[5]; //T0 for: vt1, vt2, mtl, mtr, gap}• struct t0_global {float_t gt0; //global T0}

Geometry 2009 LHT runs, Cumulative update for BPD geometry runs: 5650-8946 Update geometry of the GAP TPC for 2007 runs

5

https://twiki.cern.ch/twiki/bin/viewauth/NA61/DBUpdateLog

Page 6: Database for NA61 experiment

Database status - supportDatabase status - support

DB - information NA61 TWIKI page – topic Database

• Types of the keys for DB• Keys values for runs• Structures in DB• DB Update Log• DB Dump

6

Page 7: Database for NA61 experiment

DSPACK DUMP

Database dumpDatabase dump

7

SQL DUMP

http://www.nuph.us.edu.pl/~skowalsk/local_user/db/db_dump/

Page 8: Database for NA61 experiment

KEYs valuesKEYs values

8

No defaults

Page 9: Database for NA61 experiment

Problems with KEYsProblems with KEYs

Experts Perfect solution – see Antoni M. TWIKI log

9

Page 10: Database for NA61 experiment

In the spirit of Software UpdateIn the spirit of Software Update

New structure of DB One DBMS (like MySQL (tested) or Oracle (tested)) Three different kind of users:

• User/ Client (ordinary user) – no knowledge about DB, calibration parameters etc,• Developer/ Experts of some subsystems – knowledge of parameters for subsystems and

dependence systems• Database Administrator – knowledge about DB

10

Logical connection of parameters or detector systems

Run Number

Global versions (only one default for run)

Structure1 Structure2 Structure3

STR1 V1 STR1 V2 STR2 V1 STR2 V1 STR3 V1 …

Page 11: Database for NA61 experiment

In the spirit of Software Update In the spirit of Software Update

11

mysql> select * from Production;+----------------+----------------+-------------+---------------------+| RunNumber | RunDate | RunTime | DefaultVersion |+----------------+----------------+-------------+---------------------+| 8001 | 2009-09-11 | 10:00:00 | V09_01 | | 8002 | 2009-09-11 | 18:00:00 | V09_02 | | 8003 | 2009-03-12 | 10:00:00 | V09_02 | | 8004 | 2009-03-11 | 18:00:00 | V09_01 | +----------------+----------------+-------------+---------------------+4 rows in set (0.00 sec)

mysql> select * from ListOfVersions;+------------------+---------------------+-------------------------------+| GlobalVersion | StructureName | StructureVersion |+------------------+---------------------+-------------------------------+| V09_01 | GPCCalib | V_GPCCalib_09_02 | | V09_01 | BPDGeometry | V_BPDGEOM_09_02 | | V09_01 | GPCGeometry | V_GPCGEOM_09_01 | | V09_02 | BeamGeometry | V_BEAMGEOM_09_01 | | V09_02 | BPDGeometry | V_BPDGEOM_09_03 |+------------------+-----------------------+-------------------------------+5 rows in set (0.00 sec)

mysql> select * from BPDGeometry;+-------------------+------------------===-----+------------------------------------------+---------------+| StructureName | StructureVersion | DataFileName | comments |+-------------------+-----------------------------+------------------------------------------+---------------+| BPDGeometry | V_BPDGEOM_09_01 | BPDGeometry/run111-999.ds | NULL | | BPDGeometry | V_BPDGEOM_09_02 | BPDGeometry/run111-999.root | NULL | | BPDGeometry | V_BPDGEOM_09_03 | BPDGeometry/run888-999.ds | NULL | +-------------------+-----------------------------+------------------------------------------+---------------+3 rows in set (0.00 sec)

Page 12: Database for NA61 experiment

In the spirit of Software Update In the spirit of Software Update

Name convention: Global: V+2 last digits of year _ 2 digits i.e.

• V09_01, • V09_02

Structure: V_structure name _ 2 last digits of year _ 2 digits • V_BDPGEOM_09_01• V_GPCGEOM_09_01

12

Page 13: Database for NA61 experiment

New DB architectureNew DB architecture

13

Page 14: Database for NA61 experiment

New DB architecture – user privilegesNew DB architecture – user privileges

14

Expert - Developer

DB Administrator

Page 15: Database for NA61 experiment

SummarySummary

The DB is updated on user request

Backup DB server

Possible local installation

Installation on ORACLE (development stage) Possible access from outside The development DB on Oracle – devdb10 user: NA61_skowalsk Conversion from MySQL SQL to Oracle SQL for old DB – done

The new DB structure is tested on MySQL system Ready to install Necessary modification of plug-in script Keep data in .ds or .root files

15

Page 16: Database for NA61 experiment

Next stepsNext steps

Near future Move from the development to the production stage on Oracle Plug-in modification for Oracle Collaboration decision on DBMS

Far future (but not so far) Production stage of new DB New client for DB Collaboration commissioning

16

Page 17: Database for NA61 experiment

[email protected]

Thank youThank you