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