|
BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
|
The Geometry Database is a main component of the Geometry Information System designed to store, process and manage information on geometry models of detectors. The repository contains an interface to work with the Geometry Database of an experiment.
| File / directory | Description |
|---|---|
| GeoSetup | Loading of the geometry setups from the Local (SQLite) or Central Geometry Database for simulation (FairRunSim) and reconstruction (gGeoManager), magnetic field and parameter files of the setup |
| geo_db_settings.h | Settings of the Geometry Database |
| SetEnv.sh | Environment for the standalone use of the interface |
| local.db, storage | Local Geometry Database (SQLite replica of the Central one) and its geometry and magnetic field files; they are downloaded at the CMake configuration step (see DBL_FILE_PATH below) and are not stored in git |
| macros | Macros to install the Local Geometry Database, list and load the setups |
| examples | XML format of the local customization of a setup |
| doc | Doxygen configuration and reference manual of the interface |
The interface is built into the GeoDb library; it is a git submodule developed in the nica_db/geo_api repository at git.jinr.ru.
The interface of the Geometry Database requires the following external software to be installed: SQLite database engine, FairSoft package including CERN ROOT 6 environment and FairRoot package of the FAIR collaboration.
Please make sure the SQLite database engine has been installed on your system before compiling FairSoft.
sudo yum install -y sqlite-devel
sudo apt-get install -y libsqlite3-dev
Detailed instructions on how to install the FairSoft package including CERN ROOT 6 can be found on the corresponding website https://github.com/FairRootGroup/FairSoft.
Detailed instructions on how to install the FairRoot software can be found on the website of the framework: https://github.com/FairRootGroup/FairRoot.
NOTE: A detailed example of installing the FairSoft and FairRoot packages can be found at the website of our experiment here: https://bmn.jinr.ru/software-installation/ ("Installing the external packages" Section).
Before deploying and using the Local Geometry Database based on SQLite, DBL_FILE_PATH variable should be set, which contains a desired full path to 'local.db' file to be downloaded, e.g. >export DBL_FILE_PATH=**[your_target_path]**/local.db
NOTE: Run “export DBL_FILE_PATH=**[your_target_path]**/local.db” every time you run terminal to work with the geometry database (or append this line to the .bashrc file).
NOTE: If a requested geometry setup is absent in the Local Geometry Database, it is downloaded from the Central One to the directory of the DBL_FILE_PATH file. This directory can be read-only, e.g. on CVMFS, so the database is installed to a writable directory instead, and the running process uses it from now on: the database is installed to a unique folder, so parallel jobs do not overwrite the files of each other. The folder is removed when the process exits normally. This folder is created in the following directory:
The Application Programming Interface of the Geometry Database is cloned from GitLab. Change directory to a desired path, where the Geometry API will be downloaded and run:
The Local Geometry Database can be downloaded in one of two ways:
1st way = Use prepared ROOT macro for the installation of the Geometry Database
NOTE: By default, in the SetEnv.sh file SIMPATH points to */opt/fairsoft/install*, and FAIRROOTPATH - */opt/fairroot/install* directories. If you installed FairSoft or FairRoot to another directory, please, change SIMPATH and FAIRROOTPATH variables in the file ("export SIMPATH=[your FairSoft install path]" and "export FAIRROOTPATH=[your FairRoot install path]").
2nd way = Manual downloading from the Geometry Web Service
The button for downloading full geometry database of an experiment is avaliable on the Geometry Web Service of the experiment in the upper part of the website. It ensures to download the replica of the full geometry database in the SQLite database format, which is presented as TAR archive file, namely “localdb.tar”. The TAR file includes “storage” folder and “local.db” file.
NOTE: Before using the ROOT macros to work with the Geometry Database, the variable DBL_FILE_PATH should be set, which contains path to the SQLite file storing the replica of the Central Geometry Database.
To show a list of the geometry setups in the local database:
root -b -q getSetupList.C
To load a geometry setup in your application, use GeoSetup class instance. It has the following main methods:
Directories | |
| doc | |
| Geometry Database API documentation | |
| examples | |
| Local geometry customization | |
| macros | |
| Geometry Database macros | |
Files | |
| geo_db_settings.h | |
| GeoSetup.cxx | |
| GeoSetup.h | |