ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
DataQuality
DCSCalculator2
share
examples
calc_idbs.py
Go to the documentation of this file.
1
#! /usr/bin/env python
2
3
from
DQUtils
import
fetch_iovs, write_iovs
4
from
DQUtils.iov_arrangement
import
inverse_lblb
5
from
DQUtils.utils
import
pprint_objects
6
7
from
DCSCalculator2.lib
import
dcsofl_cool_record
8
from
DCSCalculator2.subdetectors
import
IDBS
9
10
def
calculate_idbs
(run_range):
11
# List of lumiblocks to run over
12
lbtime = inverse_lblb(fetch_iovs(
"LBLB"
, runs=run_range))
13
14
idbs = IDBS()
15
idbs.input_db =
"COOLOFL_INDET/CONDBR2"
16
17
result_iovs = idbs.run(lbtime)
18
19
print
"Will write the following:"
20
pprint_objects(result_iovs)
21
for
entry
in
result_iovs:
22
print
entry.since.run, entry.since.lumi,
"->"
, entry.until.lumi, entry.Code
23
24
write_iovs(
"idbs_test.db/CONDBR2::/GLOBAL/DETSTATUS/DCSOFL"
,
25
result_iovs, dcsofl_cool_record())
26
27
if
__name__ ==
"__main__"
:
28
print
"Querying single run:"
,
29
calculate_idbs
(165703)
30
31
print
"Querying with run range:"
32
calculate_idbs
((165703, 165817))
calc_idbs.calculate_idbs
calculate_idbs(run_range)
Definition
calc_idbs.py:10
Generated on
for ATLAS Offline Software by
1.17.0