Belle II Software  release-06-00-14
ARICHImportGeometryToDB.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 import basf2 as b2
12 import os
13 
14 home = os.environ['BELLE2_LOCAL_DIR']
15 
16 # change if you use different local DB folder (see arich/examples/database... examples of database usage)
17 # use_local_database(home + "/arich/database/cosmicTest_payloads/cosmicTest_database.txt",
18 # home + "/arich/database/cosmicTest_payloads")
19 # use_local_database(home + "/arich/database/newGeo/database.txt",
20 # home + "/arich/database/newGeo")
21 b2.use_local_database("localdb/database.txt", "localdb")
22 
23 
24 gearbox = b2.register_module('Gearbox')
25 
26 main = b2.create_path()
27 main.add_module('EventInfoSetter', evtNumList=1, logLevel=b2.LogLevel.DEBUG)
28 main.add_module(gearbox)
29 
30 # import geometry for ARICH only
31 geometry = b2.register_module('Geometry')
32 geometry.param('components', ['ARICH'])
33 geometry.param('payloadIov', [0, 0, -1, -1])
34 geometry.param('createPayloads', 1)
35 main.add_module(geometry)
36 print("Geometry Imported to the database!")
37 b2.process(main)