14 from ROOT.Belle2
import KLMDatabaseImporter, KLMStripEfficiency, KLMChannelIndex
17 if (len(sys.argv) < 2):
18 print(
'Usage: basf2 ImportStripEfficiency.py [mc | input_file].')
19 elif (sys.argv[1] ==
'mc'):
22 inputFile = sys.argv[1]
24 dbImporter = KLMDatabaseImporter()
26 stripEfficiency = KLMStripEfficiency()
29 index = KLMChannelIndex()
30 index2 = KLMChannelIndex()
31 while (index != index2.end()):
32 channel = index.getKLMChannelNumber()
33 stripEfficiency.setEfficiency(channel, 1.0, 0.0)
36 dbImporter.setIOV(0, 0, 0, -1)
37 dbImporter.importStripEfficiency(stripEfficiency)
39 dbImporter.setIOV(1002, 0, 1002, -1)
40 dbImporter.importStripEfficiency(stripEfficiency)
42 dbImporter.setIOV(1003, 0, 1003, -1)
43 dbImporter.importStripEfficiency(stripEfficiency)
46 dbImporter.loadStripEfficiency(stripEfficiency, inputFile)
48 dbImporter.setIOV(0, 0, -1, -1)
49 dbImporter.importStripEfficiency(stripEfficiency)