ATLAS Offline Software
Loading...
Searching...
No Matches
find_tgc_unfilled_channelids.py
Go to the documentation of this file.
1#! /usr/bin/env python
2
3from IPython.Shell import IPShellEmbed; ip = IPShellEmbed(["-pdb"])
4
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
9
10runs = 165732, 165733
11
12iovs = inverse_lblb(fetch_iovs("LBLB", runs=runs))
13start, end = iovs.first.since, iovs.last.until
14
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()))
19
20tgc_conditions = TGC_data.read_tgc_conditions(start.date, end.date)
21tgc_channels_nonempty = set(iov.channel for iov in tgc_conditions if iov)
22
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)
STL class.