Skip to content

Commit 21d7d16

Browse files
authored
new executable to scan HV/LV CCDB objects and look for issues (#14022)
1 parent 2395824 commit 21d7d16

File tree

3 files changed

+1184
-2
lines changed

3 files changed

+1184
-2
lines changed

Detectors/MUON/MCH/Conditions/CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ o2_add_executable(
3737
O2::MCHGlobalMapping
3838
)
3939

40+
o2_add_executable(
41+
scan-hvlv-ccdb
42+
COMPONENT_NAME mch
43+
SOURCES src/scan-hvlv-ccdb.cxx
44+
PUBLIC_LINK_LIBRARIES
45+
O2::CCDB
46+
O2::CommonUtils
47+
O2::DetectorsDCS
48+
O2::MCHConditions
49+
O2::MCHStatus
50+
)
51+
4052
if(BUILD_TESTING)
4153
o2_add_test(
4254
dcs-aliases

Detectors/MUON/MCH/Conditions/README.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Those objects are stored at the following CCDB paths :
1717
- MCH/Calib/BadChannel
1818
- MCH/Calib/RejectList
1919

20-
The BadChannel and RejectList objects can be uploaded, e.g. for debug purposes, using the `o2-mch-bad-channels-ccdb` program :
20+
# o2-mch-bad-channels-ccdb
21+
22+
The BadChannel and RejectList objects can be uploaded, e.g. for debug purposes, using the `o2-mch-bad-channels-ccdb` program:
2123

2224
```shell
2325
$ o2-mch-bad-channels-ccdb --help
@@ -46,10 +48,57 @@ Usage:
4648
-a [ --alias ] arg DCS alias (HV or LV) to reject
4749
```
4850

49-
For instance, to create in a local CCDB a RejectList object which declares solar number 32 as bad, from Tuesday 1 November 2022 00:00:01 UTC to Saturday 31 December 2022 23:59:59, use :
51+
For instance, to create in a local CCDB a RejectList object which declares solar number 32 as bad, from Tuesday 1 November 2022 00:00:01 UTC to Saturday 31 December 2022 23:59:59, use:
5052

5153
```shell
5254
$ o2-mch-bad-channels-ccdb -p -s 32 -t RejectList --starttimestamp 1667260801000 --endtimestamp 1672531199000
5355
```
5456

5557
The program will search the reference CCDB (defined with `--referenceccdb`) for existing objects valid during this period and propose you to either overwrite them or update them. In the first case, a single object will be created, valid for the whole period, containing only the new bad channels. In the second case, as many objects as necessary will be created with appropriate validity ranges, adding the new bad channels to the existing ones.
58+
59+
# o2-mch-scan-hvlv-ccdb
60+
61+
the HV or LV DCS datapoints stored in the CCDB (http://alice-ccdb.cern.ch) can be scanned using the `o2-mch-scan-hvlv-ccdb` program:
62+
63+
```shell
64+
$ o2-mch-scan-hvlv-ccdb -h
65+
This program scans HV or LV channels looking for issues
66+
Usage:
67+
-h [ --help ] produce help message
68+
-r [ --runs ] arg run(s) to scan (comma separated list of runs
69+
or ASCII file with one run per line)
70+
-c [ --channels ] arg channel(s) to scan ("HV" or "LV" or comma
71+
separated list of (part of) DCS aliases)
72+
--configKeyValues arg Semicolon separated key=value strings to
73+
change HV thresholds
74+
-d [ --duration ] arg (=0) minimum duration (ms) of HV/LV issues to
75+
consider
76+
-w [ --warning ] arg (=1) warning level (0, 1 or 2)
77+
-p [ --print ] arg (=1) print level (0, 1, 2 or 3)
78+
-o [ --output ] arg (=scan.root) output root file name
79+
```
80+
81+
It takes as input a list of runs and a list of either HV or LV channels to scan. **Note that it will scan the CCDB from the begining of the first run to the end of the last one, which can represent quite of lot of files.** More details about the options are given below.
82+
83+
It produces as output a list of detected issues, with time, duration and affected runs, and a root file with the displays of the data points per channel per chamber for a visual inspection. Issues are triggered when HV/LV values go below a given threshold. For HV channels it also compares the issues found by the internal algorithm with the ones found by [Detectors/MUON/MCH/Status/src/HVStatusCreator.cxx](../Status/src/HVStatusCreator.cxx).
84+
85+
For instance, to scan all HV channels for runs 545222 and 545223 and detect issues of a minimum duration of 10s, use:
86+
```shell
87+
o2-mch-scan-hvlv-ccdb -r 545222,545223 -c HV -d 10000
88+
```
89+
90+
### channel input formats:
91+
* "HV" to scan all HV channels
92+
* "LV" to scan all LV channels
93+
* comma separated list of (part of) DCS aliases, which must be all of the same type, i.e contain either Quad/Slat (type = HV), or Group/an/di/Sol (type = LV)
94+
95+
### warning levels:
96+
* 0: no warning
97+
* 1: check data points timestamp w.r.t. HV/LV file validity range with ±5s tolerance
98+
* 2: check data points timestamp w.r.t. HV/LV file validity range without tolerance
99+
100+
### print levels:
101+
* 0: print detected issues
102+
* 1: same as 0 + print validity range of runs and HV/LV files
103+
* 2: same as 1 + print the first and last data points of each selected channel
104+
* 3: same as 1 + print all the data points of each selected channel

0 commit comments

Comments
 (0)