8
Offline Weekly Meeting 12 February 2009

OCDB ACCESS

  • Upload
    merlin

  • View
    30

  • Download
    0

Embed Size (px)

DESCRIPTION

OCDB ACCESS. Offline Weekly Meeting 12 February 2009. The Idea. The Idea is to make it as easy as possible to access the OCDB (i.e. setting the default storage), without setting by hand the AliEn path: - PowerPoint PPT Presentation

Citation preview

Page 1: OCDB ACCESS

Offline Weekly Meeting12 February 2009

Page 2: OCDB ACCESS

The Idea is to make it as easy as possible to access the OCDB (i.e. setting the default storage), without setting by hand the AliEn path:

MC: Since no dependence on the AliRoot version is there anymore, in case of simulation/reconstruction of MC data, the only necessary information concerns the type of simulation (Ideal, Residual, Full)

Raw data: a map to get the AliEn folder from the run number is needed

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue

Page 3: OCDB ACCESS

In order to avoid any confusion with what was there in the past, the same methods will be kept:

void SetDefaultStorage(const char* dbString);

void SetDefaultStorage(const AliCDBParam* param);

void SetDefaultStorage(AliCDBStorage *storage);

void SetSpecificStorage(const char* calibType, const char* dbString);

void SetSpecificStorage(const char* calibType, AliCDBParam* param);

For MC data, an additional method is added – overloading of the existing SetDefaultStorage

void SetDefaultStorage(const char* runType, const char* simType);According to the specified sim-type, the proper MC OCDB folder is returned (hardcoded in AliRoot)

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue

Page 4: OCDB ACCESS

In the case of Raw data, the run number is needed the Default Storage will be set in two steps:

The existing method is used:void SetDefaultStorage(const char* dbString);

dbString = “raw://”

If dbString == “raw://”:

A flag (fRaw) is activated in the AliCDBManager instance

A grid storage is automatically set, without pointing to any specific folder

In AliReconstruction, InitCDB() returns without doing anything

In AliReconstruction, SetNumberFromData() sets the run number for the AliCDBManager: as soon as the method AliCDBManager::SetRun(Int_t run) is called, if fRaw is active, the proper Default Storage is set

The setting for the Specific Storages remains as valid as before

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue

Page 5: OCDB ACCESS

The correspondance between the Run Number and the AliEn OCDB Folder to be set as Default Storage is done via the parsing of an XML file on the grid (path hardcoded in AliRoot)

<?xml version="1.0"?>

<!DOCTYPE LHCPeriodvsRunRange [ <!ELEMENT LHCPeriodvsRunRange (Folder*)>

<!ELEMENT Folder EMPTY>

<!ATTLIST Folder StartRunRange CDATA #REQUIRED>

<!ATTLIST Folder EndRunRange CDATA #REQUIRED>

<!ATTLIST Folder LHCPeriodFolder CDATA #REQUIRED> ]> <LHCPeriodvsRunRange>

<Folder StartRunRange="0" EndRunRange="10" LHCPeriodFolder="alien://folder=/alice/data/2008/LHC08a/OCDB"> </Folder> <Folder StartRunRange="11" EndRunRange="20" LHCPeriodFolder="alien://folder=/alice/data/2008/LHC08b/OCDB"> </Folder> </LHCPeriodvsRunRange>

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue

Page 6: OCDB ACCESS

A SAX Parser will be used:AliCDBSaxHandler class

Given the run number r_num, the Parsing function returns the start run, the end run for the run range r_num belongs to, and the AliEn folder to be set as Default StorageAt a subsequent AliCDBManager::SetRun() call, the Parsing function is called again only if the new r_num’ is outside the run range already considered.

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue

Page 7: OCDB ACCESS

An issue concerning the possibility to overwrite a file for MC Simulation aroseSo far, the version of a file in the Grid was determined by what was already there in the OCDB no possibility to set anything manually (this prevented to loose files)From MC simulation, it is now needed to overwrite files keeping the same version

...First idea...When creating the AliCDBEntry, the version has to be explicitely set The AliCDBEntry::HasVersion() method is now used when creating the Id for an AliCDBEntryWhen putting a new entry in AliEn, the “RECREATE” option is used instead of “CREATE”, otherwise an error may occur

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue

Page 8: OCDB ACCESS

OCDB AccessThe proposed solution has been tested, and everything works fine within the OCDB frameworkThe necessary changes in AliReconstruction are still missingSome minor details still to be fixed – e.g. the parsing of the file should check possible overlaps between run ranges

Overwriting of an OCDB grid file Some additional protections may be added...

15th January 2009Chiara Zampolli – Offl. Weekly

Meeting OCDB Issue