TWiki> LHCb Web>LHCbVELO>VetraHowTo (revision 3)EditAttachPDF
New VETRA v5r2

Condition Data Base

In the new release parameters for the processing algorithms can be defined in either STATIC or DYNAMIC modes. This part of the description will focuse on the DYNAMIC configuration and explain how to create the condition Data Base for the Vetra.

In the current version one needs to use two scripts to create a SQLite file with conditions. The steps are described below

1. Creation of the valid XML description of the conditions.

In order to create the file it takes to run a python script The script is located in the Vetra/v5r2/python directory. The file created by the script - VeloTELL1Cond.xml - will be placed in the Vetra/v5r2/VetraCondDB/Velo/VeloCondDB directory by default (the default location should not be changed by user at any rate!). VeloTELL1Cond contains a collection of TELL1 conditions that in turn contain processing parameters needed for both the emulation and the TELL1 boards configuration. The example of a condition containing just a single number:

<condition classID="5" name="VeloTELL1Board0">
  <param name="pedestal_enable" type="int">

and a vector of numbers:

<paramVector name="pedestal_sum" type="int">
   524288 524288 524288 524288 524288 524288 524288 ....

In order to create the data base file properly another xml file is needed that specifies which conditions are to be put to the data base. The file is located in the same directory as VeloTELL1Cond.xml file and is called velocond.xml. A snipet of the xml code from the file is presented below:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE DDDB SYSTEM "../DTD/structure.dtd">
   <catalog name="VeloCondDB">
     <!-- R sensors - 0:41 -->
     <conditionref href="VeloTELL1Cond.xml#VeloTELL1Board0"/>
     <conditionref href="VeloTELL1Cond.xml#VeloTELL1Board1"/>

Each condition we want to have in the Condition Data Base should be declared there.

2. Writing xml condition into the SQLite file.

To create a valid SQLite data base file one needs to run a script called create_sqlite_file_from_xml.(c)sh located in Vetra/v5r2/scripts/ directory (just by executing source from the Vetra cmt/ directory). The script will search for the file with defined entry point to the data base (in our case the entry point is defined in the lhcb.xml file that can be found in the Vetra/v5r2/VetraCondDB/Velo/ directory. The most important part of the file from the Vetra point of view is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE DDDB SYSTEM "DTD/structure.dtd">
  <!--  **********************************************************  -->
  <!--  *           LHCb Detector Description Data Base          *  -->
  <!--  *              new hierarchy detector setup              *  -->
  <!--  **********************************************************  -->
  <catalog name="dd">
 <catalogref href="VeloCondDB/velocond.xml#VeloCondDB" />

This link points to the file where Vetra conditions are specified. The create_sqlite_file_from_xml.(c)sh will create the SQLite data base file at /Vetra/v5r2/VetraCondDB/Velo/ with the default VELOCOND.db name for the file and VELOCOND for the data base name. At this point the data base with the base line procesing parameters is ready to use within the Vetra!


After the SQLite file has been produced it is worth to make sure that the file contains everything we need. The most obvious test is to just look inside the file using To do so, one can perform as follow:

1. Setup the Vetera v5r2 environment (cmt config and source setup.(c)sh) 2. This is a kind of magoc line to have all you need to run graphical UI to the ConditionDB

SetupProject LHCb v23r2 --use=Tools/CondDBUI

3. Open the GUI by executing:

4. Connect to the data base providing location of the data base and its name (for the described default settings the location is Vetra/v5r2/VetraCondDB/Velo/VELOCOND.db and the DB name is VELOCOND)

5. You are ready to take a peek inside the DB

Using the data base from Gaudi job

There are a few magic lines that need to be add to the option file to use our new and shine CondDB. Note the Vetra DB will be added as a layer on the top of default LHCb data bases. Should there be any need for some information that are not in the VELOCOND.db the appropriate service will peer through the Vetra DB and start to search the remaining DBs. This of course needs to be passed to the framework by appropriete options. The full description and examples are given below.

1. By the default this line should be added to the option file:

#include "$DDDBROOT/options/DC06.opts"

2. Next we need to create an appropriate service to read our DB:


3. Let create layers of the DB we will be using (first one will be the Vetra CondDB and the LHCb DBs beneth it)

CondDBLayeringSvc.Layers={'CondDBAccessSvc/VELOCOND', 'CondDBDispatcherSvc'};

4. The last point is to provide approprate connection string:


Now the Vetra CondDB will be visible from inside a Gaudi job.

-- TomaszSzumlak - 12 May 2008

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2008-05-12 - TomaszSzumlak
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LHCb All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback