3from DCSCalculator2.subdetectors
import LAr, Lucid, MDT, Pixels, RPC, SCT, TDQ, Tile, TGC, TRT
22 assert (before.since, before.until) == (after.since, after.until)
23 assert before._fields == after._fields
25 if not hasattr(
type(before),
"_is_empty"):
type(before)._is_empty =
False
26 if not hasattr(
type(after),
"_is_empty"):
type(after)._is_empty =
False
28 print " ", before.since, before.until,
31 print " Empty -> Filled"
33 print " Filled -> Empty"
35 for field, val_before, val_after
in zip(before._fields, before, after):
36 if val_before != val_after:
37 print field, val_before,
"->", val_after,
67 since, until = RunLumi(run, 0), RunLumi(run+1, 0)
69 with timer(
"Read LBLB"):
70 lblb = fetch_iovs(
"LBLB", since, until, with_channel=
False)
71 lbtime = inverse_lblb(lblb)
89 with timer(
"Calculate result for %s" % system):
90 result = system.run(lbtime)
96 print "Run range:", since,
"to", until
97 print "DCSC2 intervals of validity:"
98 pprint_objects(result[:30])
101 output_channels = system.mapping.keys()
102 iovs = fetch_iovs(
"DCSOFL", since, until, output_channels)
106 print "Original DCSC intervals of validity:"
107 pprint_objects(iovs[:30])
120 ipython_instance = IPShellEmbed([
"-pdb"], rc_override=dict(quiet=
True))