15 from ROOT.Belle2
import KLMElectronicsMapImporter, KLMElementNumbers, BKLMElementNumbers
17 basf2.set_log_level(basf2.LogLevel.INFO)
20 if (len(sys.argv) >= 2):
21 if (sys.argv[1] ==
'mc'):
25 importer = KLMElectronicsMapImporter()
28 def clear_electronics_map():
30 Clear electronics map (to load another version).
32 importer.clearElectronicsMap()
35 def load_bklm_electronics_map(version, mc):
37 Load BKLM electronics map.
39 1 = before experiment 10.
40 2 = experiment 10 and later (mapping in chimney sector has changed).
43 importer.loadBKLMElectronicsMap(1)
45 importer.loadBKLMElectronicsMap(version)
48 importer.setLane(KLMElementNumbers.c_BKLM,
49 BKLMElementNumbers.c_BackwardSection,
51 importer.setLane(KLMElementNumbers.c_BKLM,
52 BKLMElementNumbers.c_BackwardSection,
56 def load_eklm_electronics_map(version, mc):
58 Load EKLM electronics map.
60 1 = phase 2 (wrong connection of cables for backward sectors 2 and 3).
63 importer.loadEKLMElectronicsMap(version, mc)
69 load_bklm_electronics_map(1,
True)
70 load_eklm_electronics_map(1,
True)
72 importer.setIOV(0, 0, 0, -1)
73 importer.importElectronicsMap()
75 importer.setIOV(1002, 0, 1002, -1)
76 importer.importElectronicsMap()
78 importer.setIOV(1003, 0, 1003, -1)
79 importer.importElectronicsMap()
85 load_bklm_electronics_map(1,
False)
86 load_eklm_electronics_map(1,
False)
87 importer.setIOV(1, 0, 3, -1)
88 importer.importElectronicsMap()
91 clear_electronics_map()
92 load_bklm_electronics_map(1,
False)
93 load_eklm_electronics_map(2,
False)
94 importer.setIOV(4, 0, 9, -1)
95 importer.importElectronicsMap()
98 clear_electronics_map()
99 load_bklm_electronics_map(2,
False)
100 load_eklm_electronics_map(2,
False)
101 importer.setIOV(10, 0, -1, -1)
102 importer.importElectronicsMap()