15from ROOT
import Belle2
16from ROOT.Belle2
import KLMElectronicsMapImporter, KLMElementNumbers, BKLMElementNumbers
18basf2.set_log_level(basf2.LogLevel.INFO)
21if (len(sys.argv) >= 2):
22 if (sys.argv[1] ==
'mc'):
26importer = KLMElectronicsMapImporter()
29def clear_electronics_map():
31 Clear electronics map (to load another version).
33 importer.clearElectronicsMap()
36def load_bklm_electronics_map(version, mc):
38 Load BKLM electronics map.
40 1 = before experiment 10.
41 2 = experiment 10 and later (mapping
in chimney sector has changed).
44 importer.loadBKLMElectronicsMap(1)
46 importer.loadBKLMElectronicsMap(version)
49 importer.setLane(KLMElementNumbers.c_BKLM,
50 BKLMElementNumbers.c_BackwardSection,
52 importer.setLane(KLMElementNumbers.c_BKLM,
53 BKLMElementNumbers.c_BackwardSection,
57def load_eklm_electronics_map(version, mc):
59 Load EKLM electronics map.
61 1 = phase 2 (wrong connection of cables for backward sectors 2
and 3).
64 importer.loadEKLMElectronicsMap(version, mc)
70 load_bklm_electronics_map(1,
True)
71 load_eklm_electronics_map(1,
True)
73 importer.setIOV(0, 0, 0, -1)
74 importer.importElectronicsMap()
76 importer.setIOV(1002, 0, 1002, -1)
77 importer.importElectronicsMap()
79 importer.setIOV(1003, 0, 1003, -1)
80 importer.importElectronicsMap()
86 load_bklm_electronics_map(1,
False)
87 load_eklm_electronics_map(1,
False)
88 importer.setIOV(1, 0, 3, -1)
89 importer.importElectronicsMap()
92 clear_electronics_map()
93 load_bklm_electronics_map(1,
False)
94 load_eklm_electronics_map(2,
False)
95 importer.setIOV(4, 0, 9, -1)
96 importer.importElectronicsMap()
99 clear_electronics_map()
100 load_bklm_electronics_map(2,
False)
101 load_eklm_electronics_map(2,
False)
102 importer.setIOV(10, 0, -1, -1)
103 importer.importElectronicsMap()