13 from ROOT
import Belle2
23 if not input_files.empty()
and input_files.front().endswith(
".sroot"):
24 root_input = b2.register_module(
'SeqRootInput')
26 root_input = b2.register_module(
'RootInput')
28 main = b2.create_path()
29 main.add_module(root_input)
31 histo = b2.register_module(
'HistoManager')
32 histoutput_name = input_files.front().split(
'/')[-1]
33 histoutput_name =
'./monitor_plots/' + histoutput_name[:histoutput_name.rfind(
'.')] +
'.unpacked.root'
34 histo.param(
"histoFileName", histoutput_name)
35 main.add_module(histo)
39 main.add_module(
'Progress')
40 unpacker = b2.register_module(
'CDCTriggerUnpacker')
41 unpacker.logging.log_level = b2.LogLevel.DEBUG
43 unpacker.logging.debug_level = 10
44 unpacker.logging.set_info(b2.LogLevel.DEBUG, b2.LogInfo.LEVEL | b2.LogInfo.MESSAGE)
46 unpacker.param(
'headerSize', 3)
48 unpacker.param(
'unpackTracker2D',
True)
50 unpacker.param(
'decode2DFinderInput',
True)
51 unpacker.param(
'decode2DFinderTrack',
True)
53 unpacker.param(
'2DNodeId', [
58 unpacker.param(
'2DNodeId_pcie40', [
64 main.add_module(unpacker)
68 empty_path = b2.create_path()
69 unpacker.if_false(empty_path)
71 main.add_module(
'TRGCDCT2DDQM')
76 output_name = input_files.front().split(
'/')[-1]
77 output_name = output_name[:output_name.rfind(
'.')] +
'.unpacked.root'
78 main.add_module(
'RootOutput',
79 outputFileName=output_name,
80 excludeBranchNames=[
'RawCDCs',
static Environment & Instance()
Static method to get a reference to the Environment instance.