3from ..lib
import DCSC_DefectTranslate_Subdetector, DCSC_Variable
4from DQUtils
import Databases
5from DQUtils.channel_mapping
import get_channel_ids_names
7folder, database =
"/STG/DCS/HV",
"COOLOFL_DCS/CONDBR2"
9ids, names, _ = get_channel_ids_names(Databases.get_folder(folder, database))
11STGBA, STGBC, STGEA, STGEC, STGIGNORE = 1, 2, 3, 4, 5
14REMOVE_FROM_STGEA = {505, 506, 507, 508, 512, 514, 521, 525, 528, 532, \
15 536, 540, 546, 553, 560, 567, 571, 575, 579, 583, 586, 590, 594, 598, 602, 606, 610, 614, 617, 621, 625, 629, 633, 637, 641, 645, 649, 653, 657, 660,
17 671, 675, 679, 683, 687, 691, 695, 699, 703, 707, 711, 715, 719, 723, 727, 731, \
18 735, 739, 743, 747, 755, 759, 763, 767, 771, 775, 779, 783, 787, 791, 795, 799, \
19 803, 807, 811, 815, 819, 823, 827, 831, 835, 839, 843, 847, 851, 855, 859, 863, \
20 867, 871, 875, 879, 883, 887, 891, 895, 899, 903, 907, 911, 915, 919, 923, 927, \
21 931, 935, 939, 943, 947, 951, 955, 959, 963, 967, 971, 975, 979, 983, 987, 991, \
22 995, 999, 1003, 1007, 1011}
24REMOVE_FROM_STGEC = {1, 5, 9, 13, 17, 20, 24, 28, 32, 36, 39, 43, 46, 50, 54, 58, 62, 65,\
25 69, 73, 77, 81, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124,\
26 128, 132, 136, 140, 144, 147, 151, 155, 159, 163, 167, 171, 174,\
27 177, 181, 185, 189, 193, 197, 201, 205, 209, 213, 217, 221, 225,\
28 229, 233, 237, 241, 245, 249, 252, 256, 260, 264, 268, 272, 276,\
29 280, 284, 288, 292, 296, 300, 304, 308, 312, 316, 320, 324, 328,\
30 332, 336, 340, 344, 348, 352, 356, 360, 364, 368, 372, 376, 380,\
31 384, 388, 392, 396, 400, 404, 408, 412, 416, 420, 424, 428, 432,\
32 436, 440, 444, 448, 452, 456, 460, 464, 468, 472, 476, 480, 484,\
37 return iov.fsmCurrentState ==
"ON"
41 folder_base =
"/STG/DCS"
49 y
for y
in (list(range(504, 1015)) + list(range(1024, 1025)))
50 if y
not in REMOVE_FROM_STGEA
53 x
for x
in (list(range(0, 504)) + list(range(1015, 1024)))
54 if x
not in REMOVE_FROM_STGEC
56 STGIGNORE: list(REMOVE_FROM_STGEA) + list(REMOVE_FROM_STGEC)
66 dead_fraction_caution =
None
67 dead_fraction_bad = 0.2
71 super(STG, self).
__init__(*args, **kwargs)
73 self.
translators = [STG.color_to_defect_translator(flag, defect)
74 for flag, defect
in ((STGEA,
'MS_STG_EA_STANDBY_HV'),
75 (STGEC,
'MS_STG_EC_STANDBY_HV'),
__init__(self, *args, **kwargs)