Belle II Software  release-08-01-10
coltest.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import sys
13 
14 import basf2 as b2
15 from simulation import register_simulation
16 from reconstruction import register_reconstruction
17 
18 
19 b2.set_log_level(b2.LogLevel.ERROR)
20 
21 argvs = sys.argv
22 argc = len(argvs)
23 
24 # print argvs[1]
25 # print argc
26 
27 # detecor components to be reconstructed
28 components = [
29  'MagneticField',
30  'BeamPipe',
31  'PXD',
32  'SVD',
33  'CDC',
34  'TOP',
35  'ARICH',
36  'BKLM',
37  'ECL',
38 ]
39 
40 # register sim/recon modules
41 register_simulation(components)
42 register_reconstruction(components)
43 
44 # create a main path
45 main = b2.create_path()
46 
47 # Add input module
48 input = b2.register_module("SeqRootInput")
49 # input.param ( "inputFileName", "/fcdisk1-1/data/sim/sim-evtgen.sroot")
50 input.param("inputFileName", "/pcidisk1-1/data/rec/rec-evtgen.sroot")
51 main.add_module(input)
52 
53 # create geometry
54 gearbox = b2.register_module('Gearbox')
55 main.add_module(gearbox)
56 geometry = b2.register_module('Geometry')
57 main.add_module(geometry)
58 
59 # Add output module
60 output = b2.register_module("SeqRootOutput")
61 output.param("outputFileName", "/dev/null")
62 
63 # Add Rbuf2Ds
64 # rbuf2ds = register_module("Rbuf2Ds")
65 # rbuf2ds.param("RingBufferName", argvs[1])
66 # main.add_module(rbuf2ds)
67 
68 # Add Progress
69 progress = b2.register_module("Progress")
70 main.add_module(progress)
71 
72 # Add Ds2Rbuf
73 # ds2rbuf = register_module("Ds2Rbuf")
74 # ds2rbuf.param("RingBufferName", argvs[2])
75 # main.add_module(ds2rbuf)
76 
77 # Run
78 b2.process(main, 5000)