5 from ROOT
import Belle2
7 from monitor_module
import Monitor
17 if not input_files.empty()
and input_files.front().endswith(
".sroot"):
18 root_input = register_module(
'SeqRootInput')
20 root_input = register_module(
'RootInput')
23 main.add_module(root_input)
25 histo = register_module(
'HistoManager')
26 histoutput_name = input_files.front().split(
'/')[-1]
27 histoutput_name =
'./monitor_plots/' + histoutput_name[:histoutput_name.rfind(
'.')] +
'.unpacked.root'
28 histo.param(
"histoFileName", histoutput_name)
29 main.add_module(histo)
33 main.add_module(
'Progress')
34 unpacker = register_module(
'CDCTriggerUnpacker')
35 unpacker.logging.log_level = LogLevel.DEBUG
37 unpacker.logging.debug_level = 10
38 unpacker.logging.set_info(LogLevel.DEBUG, LogInfo.LEVEL | LogInfo.MESSAGE)
40 unpacker.param(
'headerSize', 3)
42 unpacker.param(
'unpackTracker2D',
True)
44 unpacker.param(
'decode2DFinderInput',
True)
45 unpacker.param(
'decode2DFinderTrack',
True)
47 unpacker.param(
'2DNodeId', [
53 main.add_module(unpacker)
57 empty_path = create_path()
58 unpacker.if_false(empty_path)
60 main.add_module(
'TRGCDCT2DDQM')
65 output_name = input_files.front().split(
'/')[-1]
66 output_name = output_name[:output_name.rfind(
'.')] +
'.unpacked.root'
67 main.add_module(
'RootOutput',
68 outputFileName=output_name,
69 excludeBranchNames=[
'RawCDCs',