EmCal Calibration DataBase

Here's a little status report on where we (Nantes) stand about the EMCAL calibration database issue.

General questions/comments
Some simple tests
Working plan ?

General questions/comments

What do we write in the DB, and at which frequency ?

I must admit we're a little puzzled... From the Sergei presentation at the last emcal meeting, we tend to understand that we should save all the calibration information about EMCAL in one pass, every 15 minutes or so. Do we understand that right ?
I'm not so sure, because earlier this year, we understood that every change in one tower (detected by the Tracing program(s) of Edouard) would trigger a write in the calibration DB.
Should we now understand that every change in one tower would trigger the write in some memory "stack" which then would be saved after a given period of time (or when the stack is full) ?

Technical details/questions about the pdbcal framework


Some simple tests with pdbcal

Transaction(s)

We soon realized that we cannot do whatever we want to access the database. As you might know, the elementary unit of communication with the database is called a transaction. Objy ensure that a transaction is either a full success or a full failure (it can not be partially fullfilled). We first (naively) tried to write 1 PdbTryChan (representing 1 integer and 2 floats of calibration, for one tower) per bank, and 1000 such banks, in 1000 transactions (i.e. one each time we have a new calibration breakpoint). This is far TOO SLOW. From rlnx01, this is about 4 minutes (real time). If we do the same in ONE transaction only, it takes about 20 seconds ! May be you all know that, but I did not.
So, we'd better have few huge transactions than a huge number of tiny transactions.
This simple fact is a great constraint on the write frequency we will choose (see question 1), and thus on the interfaces between Tracing process and DB on one hand, and between DB and reading process (offline reconstruction or whatever) on the other hand. Whatever the 'user interface' will be, we know that the underlying implementation must not make too tiny transactions.

Temptative timing for writing in the cal. DB

We define one transaction to be the writing of the full EMCAL (6 PbSc sectors + 2 PbGl sectors), where : We did the test from rlnx01. Lock server was rmine00. DB was not erased between different tests (i.e. it's a somewhat realistic growing DB). Here are the results :
Number of transactionsTime (s)
1 x (1 PbSc sector only)5-9
1 x (1 PbGl sector only)8-11
1 x Full EMCAL13-20
10 x Full EMCAL90
50 x Full EMCAL410

Working plan

Could we come to a reasonable working plan towards a realistic prototype ? May be based on a slighty modified version of what I proposed in my mail to Edward on 13-Oct-1999 (see
Database discussion) :
  1. from a data file, using some tracers, write a little piece of software to put, every time you have a breakpoint, some calibration object somewhere in a buffer object (stack or whatever the like). If this object is full, dump physically to Objy.
  2. from the same data file, read back the data and calibrate them using the db (this should be then used to connect with Gabor work I guess)
  3. simulate the fact that offline software could (and would certainly) want to update the calibrations, i.e. design an interface for that.
  4. try step (1) and (2) concurrently (i.e. writing in the db new calibrations for new runs and reading at the same time calibrations for older runs).
The idea here is to have one or several definite use cases we can play with.
Laurent.Aphecetche@subatech.in2p3.fr
Last modified: Thu Nov 4 19:31:34 CET 1999