![]() |
ATLAS Offline Software
|
Functions | |
| build_states_emptyiovs (*iovsets) | |
| process_iovs (*iovsets) | |
| process_iovs_changed (*iovsets) | |
| process_iovs_mc (*iovsets) | |
| iov_yielder (*iovs) | |
| quantize_lb (since, until, states) | |
| quantize_iovs_intermediate (lbtime, iovs) | |
| default_quantizing_function (current_events) | |
| quantize_iovs (lbtime, iovs, quantizer=default_quantizing_function) | |
| quantize_iovs_slow_interm (lbtime, iovs, quantizer=default_quantizing_function) | |
| quantize_iovs_slow (lbtime, iovs, quantizer=default_quantizing_function) | |
| quantize_iovs_slow_mc (lbtime, iovs, quantizer=default_quantizing_function) | |
Variables | |
| log = logging.getLogger("DQUtils.events") | |
| python.events.build_states_emptyiovs | ( | * | iovsets | ) |
Build a states and empty_iovs list.
Definition at line 12 of file events.py.
| python.events.default_quantizing_function | ( | current_events | ) |
| python.events.iov_yielder | ( | * | iovs | ) |
Yields sets of iovs in "position" order. Each IoV gets yielded for its start and for its end. (beginning = True and False respectively)
Definition at line 115 of file events.py.
| python.events.process_iovs | ( | * | iovsets | ) |
Given a list of input iovsets containing each one channel, yield the state
of each iovset in the largest (since, until) range possible. The returned
states is the same length as the number of arguments to this function.
Example usage:
iovset = fetch_iovs("SHIFTOFL", runs=152166)
channels, iovsets = zip(*sorted(iovset.by_channel))
# `iovsets` here is a list of lists, each containing the iovs for one channel
for since, until, states in process_iovs(*iovsets):
print "From", since, "to", until
for state in states:
print "", state.channel, "is :", state.Code
or:
dcsofl_sct = fetch_iovs("DCSOFL", runs=152166, channels="SCTEA")
shiftofl_sct = fetch_iovs("SHIFTOFL", runs=152166, channels="SCTEA")
for since, until, (dcsofl, shiftofl) in process_iovs(dcsofl, shiftofl):
print ("From", since, "to", until,
"dcsofl=", dcsofl.Code,
"shiftofl=", shiftofl.Code)
Pitfall: IOVs can exist on the database where there are no state changes.
process_iovs will emit
Definition at line 30 of file events.py.
| python.events.process_iovs_changed | ( | * | iovsets | ) |
Like process_iovs but as well as a states list, also yields the set of indices which changed since the last yield.
Definition at line 74 of file events.py.
| python.events.process_iovs_mc | ( | * | iovsets | ) |
process iovs for multiple channels
Definition at line 98 of file events.py.
| python.events.quantize_iovs | ( | lbtime, | |
| iovs, | |||
| quantizer = default_quantizing_function ) |
Definition at line 193 of file events.py.
| python.events.quantize_iovs_intermediate | ( | lbtime, | |
| iovs ) |
Definition at line 157 of file events.py.
| python.events.quantize_iovs_slow | ( | lbtime, | |
| iovs, | |||
| quantizer = default_quantizing_function ) |
| python.events.quantize_iovs_slow_interm | ( | lbtime, | |
| iovs, | |||
| quantizer = default_quantizing_function ) |
Definition at line 282 of file events.py.
| python.events.quantize_iovs_slow_mc | ( | lbtime, | |
| iovs, | |||
| quantizer = default_quantizing_function ) |
Definition at line 330 of file events.py.
| python.events.quantize_lb | ( | since, | |
| until, | |||
| states ) |
Definition at line 149 of file events.py.