12from ROOT
import Belle2
22if not input_files.empty()
and input_files.front().endswith(
".sroot"):
23 root_input = b2.register_module(
'SeqRootInput')
25 root_input = b2.register_module(
'RootInput')
27main = b2.create_path()
28main.add_module(root_input)
30histo = b2.register_module(
'HistoManager')
31histoutput_name = input_files.front().split(
'/')[-1]
32histoutput_name =
'./monitor_plots/' + histoutput_name[:histoutput_name.rfind(
'.')] +
'.unpacked.root'
33histo.param(
"histoFileName", histoutput_name)
38 main.add_module(
'Progress')
39 unpacker = b2.register_module(
'CDCTriggerUnpacker')
40 unpacker.logging.log_level = b2.LogLevel.DEBUG
42 unpacker.logging.debug_level = 10
43 unpacker.logging.set_info(b2.LogLevel.DEBUG, b2.LogInfo.LEVEL | b2.LogInfo.MESSAGE)
45 unpacker.param(
'headerSize', 3)
47 unpacker.param(
'unpackTracker2D',
True)
49 unpacker.param(
'decode2DFinderInput',
True)
50 unpacker.param(
'decode2DFinderTrack',
True)
52 unpacker.param(
'2DNodeId', [
57 unpacker.param(
'2DNodeId_pcie40', [
63 main.add_module(unpacker)
67 empty_path = b2.create_path()
68 unpacker.if_false(empty_path)
70 main.add_module(
'TRGCDCT2DDQM')
75 output_name = input_files.front().split(
'/')[-1]
76 output_name = output_name[:output_name.rfind(
'.')] +
'.unpacked.root'
77 main.add_module(
'RootOutput',
78 outputFileName=output_name,
79 excludeBranchNames=[
'RawCDCs',
static Environment & Instance()
Static method to get a reference to the Environment instance.