28 sys.exit(
"trggdlSummary.py> # of arg is strange. Exit.")
33 b2.set_log_level(b2.LogLevel.INFO)
35 main = b2.create_path()
38 if f_in_root[-6:] ==
".sroot":
39 rootfiletype =
"sroot"
40 input = b2.register_module(
'SeqRootInput')
41 matchobj = re.search(
"([^\\/]+)\\.sroot", f_in_root)
42 basename = re.sub(
'\\.sroot$',
'', matchobj.group())
43 if f_in_root[-5:] ==
".root":
45 input = b2.register_module(
'RootInput')
46 matchobj = re.search(
"([^\\/]+)\\.root", f_in_root)
47 basename = re.sub(
'\\.root$',
'', matchobj.group())
49 input.param(
'inputFileName', f_in_root)
50 main.add_module(input)
54 output = b2.register_module(
'RootOutput')
55 output.param(
"outputFileName",
"trgsum/trgsum.%s.root" % basename)
56 if not os.path.isdir(
'trgsum'):
60 trggdlUnpacker = b2.register_module(
"TRGGDLUnpacker")
61 main.add_module(trggdlUnpacker)
64 trggdlsummary = b2.register_module(
'TRGGDLSummary')
65 main.add_module(trggdlsummary)
67 progress = b2.register_module(
'Progress')
68 main.add_module(progress)
70 main.add_module(output, branchNames=[
"TRGSummary"])