Belle II Software  release-08-01-10
NNDatabaseImporter.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 """
13 SVD Database importer.
14 Simple example for testing the import to database.
15 """
16 
17 import basf2 as b2
18 from ROOT import Belle2
19 
20 main = b2.create_path()
21 
22 # Event info setter - execute single event
23 eventinfosetter = b2.register_module('EventInfoSetter')
24 eventinfosetter.param({'evtNumList': [1], 'expList': [1], 'runList': [1]})
25 main.add_module(eventinfosetter)
26 
27 # Gearbox - access to xml files
28 gearbox = b2.register_module('Gearbox')
29 main.add_module(gearbox)
30 
31 # process single event
32 b2.process(main)
33 
34 # call the importer class
35 dbImporter = Belle2.SVDDatabaseImporter()
36 
37 # import the noises
38 dbImporter.importSVDHitTimeNeuralNetwork('svd/scripts/SVDTimeNet.xml')
39 dbImporter.importSVDHitTimeNeuralNetwork('svd/scripts/SVDTimeNet3.xml', True)
40 
41 print("Neural network data imported.")
This class import to the database the dbobjects SVDNoiseCalibrations and SVDPulseShapeCalibrations.