Belle II Software release-09-00-00
passthrough.py
1
8import basf2
9import hbasf2
10
11from zmq_daq.example_support import add_input_module, add_reco_modules, add_output_module
12
13from argparse import ArgumentParser
14
15if __name__ == '__main__':
16 basf2.reset_database()
17 basf2.use_central_database("data_reprocessing_prompt")
18 basf2.set_nprocesses(2)
19
20 parser = ArgumentParser()
21 parser.add_argument("--input", required=True)
22 parser.add_argument("--output", required=True)
23 parser.add_argument("--dqm", required=True)
24
25 args = parser.parse_args()
26
27 path = basf2.Path()
28 reco_path = basf2.Path()
29
30 input_module = add_input_module(path, input_address=args.input, add_expressreco_objects=True)
31
32 add_reco_modules(reco_path, dqm_address=args.dqm, mimik_startup=False)
33
34 input_module.if_value("==0", reco_path, basf2.AfterConditionPath.CONTINUE)
35
36 add_output_module(path, output_address=args.output, raw=False)
37
38 hbasf2.process(path, [args.output, args.dqm], False)