Common libraries for km3dq packages¶
The grl_library
library¶
The grl_library.py
library is the main library to extract good-run lists. It can be also easily used in any script. It allows to retrieve in the same time as the grl any QAQC variable or DQ defect for all dataset runs. The descripion of the QAQC variables can be found here
Example:
grl=get_good_run_list("D0ORCA015", "mp1_0-d2024_0-g24", ["WR", "def_operation/Unusable"])
A more detailed example is available in examples/grl_create.py
The config_library
library¶
The config_library
library is the main configuration library. It especially makes use of the files stored in the Common
directory of the light weight database
(text files hosted on the SFTP server). The data-quality tag configuration is handled by the following files:
dataquality_tag.toml
: description of the various data-quality tag. It contains a reference to the three following configuration-files.dataset.toml
: description of the dataset, i.e the concerned detector, run ranges, run type, jpp version of the QAQC file…processing.toml
: desciption of the processing version of data/Monte-Carlo.grl.toml
: description of the good-run-list tag. It includes the veto/Q-score definitions and the GRL-generation conditions.
For more details about the configuration, please have a look at the presentation at the 7/2/2024 meeting.
The library also makes use of other files:
km3dq_perf_aux
: auxiliary definition for thedataquality-plots.py
script (y-range display, normalisation factors).defect.toml
,facts.toml
anddet_fact.toml
: description of the data-quality defects, facts and detector facts. To be edited only by experts.
The lw_db_library
, lw_db_fact_library.py
and lw_db_signoff_library.py
libraries¶
These three libraries contain functions to read and decode the files stored in the light weight database
(text files hosted on the SFTP server).
NB: the lw_db_library
library is a priori obsolete and will be removed soon.
The detector_fact_classes
and detector_status_classes
classes¶
The classes are used for the SHARK gui <ttps://detector-status-km3net-detector-status-prod.apps.wok2.in2p3.fr/>. They are used in the km3dq_lw_db <https://git.km3net.de/btrocme/km3dq_lw_db/>_ (detector-fact filling) and `km3net-detectorstatus (detector fact/status Gui) libraries.
Installation¶
Install directly from the Git server via pip
(no cloneing needed):
pip install git+https://git.km3net.de/btrocme/km3dq_common
Or clone the repository and run:
make install