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