45
46 _, _, hv = get_channel_ids_names(Databases.get_folder("/MDT/DCS/HV", database))
47 _, _, lv = get_channel_ids_names(Databases.get_folder("/MDT/DCS/LV", database))
48 _, _, jt = get_channel_ids_names(Databases.get_folder("/MDT/DCS/JTAG", database))
49
50 all_keys = hv.keys() + lv.keys() + jt.keys()
51 string_keys = filter(lambda key: isinstance(key, str), all_keys)
53
54 for key in string_keys:
55
56 region, folder = key.split("__")
57 region_keys.add(region)
58
59 for key in sorted(region_keys):
60 line = "%-6s %-6s %-6s %-8s %3s" % (hv.get(key+"__HV", 0),
61 lv.get(key+"__LV", 0),
62 jt.get(key+"__JTAG", 0),
63 key,
64 detector_region(key),
65 )
66
67
68 if key == "BOG0A12" and "BOG0B12" in region_keys: continue
69 if key == "BOG0A14" and "BOG0B14" in region_keys: continue
70 if key == "BOG0B12": line = line.replace("%-6s BOG0B12" % (0), "%-6s BOG0A12" % (jt["BOG0A12__JTAG"]))
71 if key == "BOG0B14": line = line.replace("%-6s BOG0B14" % (0), "%-6s BOG0A14" % (jt["BOG0A14__JTAG"]))
72 if key == "BME5A13": line = line.replace("%-6s %-6s" % (0, 0), "%-6s %-6s" % (hv["BME4A13__HV"], lv["BME4A13__LV"]))
73 if key == "BME5C13": line = line.replace("%-6s %-6s" % (0, 0), "%-6s %-6s" % (hv["BME4C13__HV"], lv["BME4C13__LV"]))
74
75 if line:
76 print line
77
78