ATLAS Offline Software
Loading...
Searching...
No Matches
dcsc_muons_show_bad_for_variable Namespace Reference

Functions

 pretty_range (r)
 pretty_ranges (channels)
 show_variable_info (lbtime, Subdetector)
 main ()

Function Documentation

◆ main()

dcsc_muons_show_bad_for_variable.main ( )

Definition at line 40 of file dcsc_muons_show_bad_for_variable.py.

40def main():
41 from DCSCalculator2.subdetectors import MDT
42
43 lbtime = fetch_iovs("LBTIME", (177540, 0))
44
45 print "lbtime =", lbtime
46
47 show_variable_info(lbtime, MDT)
48
int main()
Definition hello.cxx:18

◆ pretty_range()

dcsc_muons_show_bad_for_variable.pretty_range ( r)

Definition at line 8 of file dcsc_muons_show_bad_for_variable.py.

8def pretty_range(r):
9 a, b = r
10 if a == b:
11 return "%i" % a
12 return "%i..%i" % r
13

◆ pretty_ranges()

dcsc_muons_show_bad_for_variable.pretty_ranges ( channels)

Definition at line 14 of file dcsc_muons_show_bad_for_variable.py.

14def pretty_ranges(channels):
15 channels = list_to_channelselection(channels, as_list=True, convert_channel=None)
16 return ", ".join(pretty_range(r) for r in channels)
17

◆ show_variable_info()

dcsc_muons_show_bad_for_variable.show_variable_info ( lbtime,
Subdetector )

Definition at line 18 of file dcsc_muons_show_bad_for_variable.py.

18def show_variable_info(lbtime, Subdetector):
19 subdetector = Subdetector()
20 for variable in subdetector.variables:
21 print "Processing variable:", variable.folder_name
22 good_iovs = variable.calculate_good_iovs(lbtime, subdetector).iovs
23
24 chans, iovs = good_iovs.chans_iovsets
25
26 if isinstance(variable, DCSC_Global_Variable):
27
28 for since, until, states in process_iovs(*iovs):
29 channels = [(state.channel, state.Code) for state in states
30 if state and state.Code < 3]
31
32 print since, until, pretty_ranges(channels)
33 else:
34
35 for since, until, states in process_iovs(*iovs):
36 channels = [state.channel for state in states
37 if state and not state.good]
38 print since, until, pretty_ranges(channels)
39