Belle II Software development
roitest_multi.py
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3
4
11
12import sys
13
14import basf2 as b2
15# from simulation import register_simulation
16# from reconstruction import register_reconstruction
17
18b2.set_log_level(b2.LogLevel.ERROR)
19
20argvs = sys.argv
21argc = len(argvs)
22
23print(argvs[1])
24print(argc)
25
26# detecor components to be reconstructed
27components = [
28 'MagneticField',
29 'BeamPipe',
30 'PXD',
31 'SVD',
32 'CDC',
33 'TOP',
34 'ARICH',
35 'BKLM',
36 'ECL',
37]
38
39# Register modules to declare objects
40# register_simulation(components)
41# register_reconstruction(components)
42
43# register modules for object definitions
44gearbox = b2.register_module('Gearbox')
45SVDUnpack = b2.register_module('SVDUnpacker')
46SVDClust = b2.register_module('SVDClusterizer')
47vxdtf = b2.register_module('VXDTF')
48SVD_DQM = b2.register_module('SVDDQM')
49vxdtf_dqm = b2.register_module('VXDTFDQM')
50trackfitter = b2.register_module('GenFitter')
51roiprod = b2.register_module('PXDROIFinder')
52roipayload = b2.register_module('ROIPayloadAssembler')
53
54# create a main path
55main = b2.create_path()
56
57# Load Geometry module
58gearbox = b2.register_module('Gearbox')
59geometry = b2.register_module('Geometry')
60
61# Add input module
62# input = register_module("SeqRootInput")
63# input.param ( "inputFileName", "/fcdisk1-1/data/sim/sim-evtgen.sroot")
64# main.add_module(input)
65
66# Add output module
67# output= register_module("SeqRootOutput")
68# output.param ( "outputFileName", "/dev/null" )
69# main.add_module(output)
70
71# Add Rbuf2Ds
72rbuf2ds = b2.register_module("Rbuf2Ds")
73rbuf2ds.param("RingBufferName", argvs[1])
74main.add_module(rbuf2ds)
75
76# HLT Tagger
77tagger = b2.register_module("HLTTagger")
78main.add_module(tagger)
79
80# RoI sender
81roisender = b2.register_module('ROISender')
82roisender.param("MessageQueueDepth", 20)
83roisender.param("MessageSize", 16384)
84roisender.param("ROIpayloadName", "ROIpayload")
85main.add_module(roisender)
86
87# Add Progress
88progress = b2.register_module("Progress")
89main.add_module(progress)
90
91# Add Elapsed Time
92elapsed = b2.register_module("ElapsedTime")
93elapsed.param("EventInterval", 1000)
94main.add_module(elapsed)
95
96# Add Ds2Rbuf
97# ds2rbuf = register_module("Ds2Rbuf")
98# ds2rbuf.param("RingBufferName", argvs[2])
99# main.add_module(ds2rbuf)
100
101# Add Ds2Raw
102ds2rbuf = b2.register_module("Ds2Raw")
103ds2rbuf.param("RingBufferName", argvs[2])
104main.add_module(ds2rbuf)
105
106# Test seqrootoutput
107# output = register_module("SeqRootOutput" )
108# output.param ( "outputFileName", "/dev/null" )
109# output.param ( "outputFileName", "/data1/data/TestOutput.sroot" )
110# main.add_module(output)
111
112# Run
113b2.process(main)