Belle II Software  release-08-01-10
unpack_merger.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 
11 
12 import basf2 as b2
13 from ROOT import Belle2
14 
15 
16 input_files = Belle2.Environment.Instance().getInputFilesOverride()
17 if not input_files.empty() and input_files.front().endswith(".sroot"):
18  root_input = b2.register_module('SeqRootInput')
19 else:
20  root_input = b2.register_module('RootInput')
21 
22 main = b2.create_path()
23 main.add_module(root_input)
24 
25 merger_unpacker = b2.register_module('CDCTriggerUnpacker')
26 merger_unpacker.logging.log_level = b2.LogLevel.DEBUG
27 merger_unpacker.logging.debug_level = 100
28 merger_unpacker.logging.set_info(b2.LogLevel.DEBUG, b2.LogInfo.LEVEL | b2.LogInfo.MESSAGE)
29 
30 main.add_module(merger_unpacker)
31 b2.process(main)
32 print(b2.statistics)
static Environment & Instance()
Static method to get a reference to the Environment instance.
Definition: Environment.cc:28