LCCD
1.5.0
|
A conditions data framework for the ILC - based on LCIO.
Upcoming testbeam efforts will need a way to store and retrieve conditions data, e.g. slow control, electronics setup and calibration constants. Typically experiments use a 'conditions database' for this purpose. While a database offers you all the functionality that is required (varying validity time ranges, tags, history, etc.) it also puts some burden on the users as they have to set up and maintain a data base system.
A simpler approach is to store conditions data in LCIO files that are used for the data itself anyhow.
While being straight forward and easy to implement this approach lacks some of the desired features for conditions data like tags, versioning and history.
LCCD is a toolkit that combines the two options in a transparent way. It is implemented in C++ and uses an Open Source implementation of a conditions database interface developed for the Atlas experiment: ConditionsDBMySQL (cvs) .
LCCD is a conditions data toolkit that is based on LCIO. It allows to handle arbitrary conditions data as long as they are expressed in terms of LCIO classes. If you don't need the full database functionality you can use LCCD with plain LCIO only. The main purpose is to provide an easy to use interface to read conditions data in any program that analyzes LCIO data. There are four different uses cases (scenarios) implemented in LCCD:
All four use cases are implemented through the common interface lccd::IConditionsHandler. This ensures that user code can be writen without making any assumption on how the conditions data is actually provided at run time.
While most users will only be interested in reading the conditions data someone has to actually create the data and make it available. The lccd::DBInterface provides easy to use methods to store and tag the data in a conditions database. The only requirement is that the data is available in an LCCollection of LCGenericObject subclasses. The data itself is stored as a BLOB (binary large object) in the database. LCCD provides streamer code for LCGenericObjects that is machine independent (using XDR). By implementing a suitable lccd::VCollectionStreamer users can in principle store any data they like in the data base. But they have to keep in mind that as long as there is no corresponding LCIO class they won't be able to use LCIO files transparently.
For the conditions database LCCD uses ConditionsDBMySQL. This is an open source implementation of the ConditionsDB interface from CERN that has been developed by the Lisbon ATLAS group.
The main features of the database are:
ConditionsDB provides a rich API for storing and retrieving data in/from a database.
However for most users the subset of functionality provided in lccd::DBInterface should suffice.
LCCD and LCIO use 64bit time stamps to synchronize data and condtions data. The definition is
Note: this is different from the convention used in SimpleTime of ConditionsDB.
LCCD provides a conversion method lccd::fromSimpleTime() in case this is needed.
LCCD comes with a number of test programs that can be used as examples for your own applications in
source/test
All examples are simple and should be self explanatory - if not please let now.