Belle II Software  release-08-01-10
TrgEclDatabaseImport.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 from ROOT.Belle2 import TrgEclDatabaseImporter
14 from ROOT.Belle2 import FileSystem
15 
16 
17 # register event info setter
18 eventinfo = b2.register_module('EventInfoSetter')
19 eventinfo.initialize()
20 
21 # register gearbox
22 gearbox = b2.register_module('Gearbox')
23 gearbox.initialize()
24 
25 
26 FAMParameters = FileSystem.findFile('../data/FAM_Parameters.dat')
27 SignalPDF = FileSystem.findFile('trg/ecl/data/SignalPDF.dat')
28 NoiseMatrix = FileSystem.findFile('trg/ecl/data/NoiseMatrix.dat')
29 
30 TMMParameters = FileSystem.findFile('trg/ecl/data/TMM_Parameters.dat')
31 ETMParameters = FileSystem.findFile('trg/ecl/data/ETM_Parameters.dat')
32 BadRunList = FileSystem.findFile('trg/ecl/data/BadRunList.dat')
33 
34 b2.use_local_database("trg_ecl/database.txt", "trg_ecl")
35 
36 dbImporter = TrgEclDatabaseImporter()
37 
38 dbImporter.setExpNumber(0, -1)
39 dbImporter.setRunNumber(0, -1)
40 
41 dbImporter.importFAMParameter(FAMParameters, NoiseMatrix, NoiseMatrix)
42 dbImporter.importTMMParameter(TMMParameters)
43 dbImporter.importETMParameter(ETMParameters)
44 dbImporter.importBadRunNumber(BadRunList)