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