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