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