3from IPython.Shell
import IPShellEmbed; ip = IPShellEmbed([
"-pdb"])
5from DCSCalculator2.subdetectors.tgc
import TGC, DCSC_Variable_TGC_HV, TGC_Database, get_mapping
6from DQUtils
import fetch_iovs
7from DQUtils.iov_arrangement
import inverse_lblb
8from itertools
import chain
12iovs = inverse_lblb(fetch_iovs(
"LBLB", runs=runs))
13start, end = iovs.first.since, iovs.last.until
15TGC_data = DCSC_Variable_TGC_HV(
None,
None)
16TGC_data.db = TGC_Database()
17mapping = get_mapping(TGC_data.db)
18TGC_data.all_channels =
set(chain(*mapping.values()))
20tgc_conditions = TGC_data.read_tgc_conditions(start.date, end.date)
21tgc_channels_nonempty =
set(iov.channel
for iov
in tgc_conditions
if iov)
23print "Total IoVs for query range:", len(tgc_conditions)
24print "Channels with IoV data:", len(tgc_conditions.channels)
25print "Channels with nonempty IoV data:", len(tgc_channels_nonempty)
26print "Channels in mapping table:", len(TGC_data.all_channels)