28 sys.exit(
"trggdlUnpacker.py> # of arg is strange.\n 1.rootname\n Exit.")
34 b2.set_log_level(b2.LogLevel.INFO)
36 b2.use_central_database(
"TRGGDL_201811")
39 if f_in_root[-6:] ==
".sroot":
40 rootfiletype =
"sroot"
41 input = b2.register_module(
'SeqRootInput')
42 if f_in_root[-5:] ==
".root":
44 input = b2.register_module(
'RootInput')
46 input.param(
'inputFileName', f_in_root)
49 unpacker = b2.register_module(
'TRGGDLUnpacker')
52 trgReadoutBoardSearch =
False
53 unpacker.param(
'trgReadoutBoardSearch', trgReadoutBoardSearch)
56 output = b2.register_module(
'RootOutput')
59 main = b2.create_path()
62 main.add_module(input)
63 main.add_module(unpacker)
65 input.param(
"inputFileName", f_in_root)
66 output.param(
"outputFileName",
"gdltrg_test.root")
68 main.add_module(output, branchNames=[
"TRGGDLUnpackerStores"])
70 if trgReadoutBoardSearch:
71 b2.process(main, max_event=100)