29 sys.exit(
"...py> # of arg is strange.\n 1.rootname\n Exit.")
36 b2.set_log_level(b2.LogLevel.INFO)
38 b2.use_central_database(
"TRGGDL_201811")
41 if f_in_root[-6:] ==
".sroot":
42 input = b2.register_module(
'SeqRootInput')
43 matchobj = re.search(
"([^\\/]+)\\.sroot", f_in_root)
44 basename = re.sub(
'\\.sroot$',
'', matchobj.group())
45 if f_in_root[-5:] ==
".root":
46 input = b2.register_module(
'RootInput')
47 matchobj = re.search(
"([^\\/]+)\\.root", f_in_root)
48 basename = re.sub(
'\\.root$',
'', matchobj.group())
51 input.param(
'inputFileName', f_in_root)
53 anarawdata = b2.register_module(
'TRGRAWDATA')
55 anarawdata.param(
'nwd_2ds', 3939)
56 anarawdata.param(
'nwd_3ds', 3939)
58 anarawdata.param(
'print_dbmap',
True)
59 anarawdata.param(
'print_clkcyc_err',
True)
60 anarawdata.param(
'cc_check',
True)
61 anarawdata.param(
'print_cc',
True)
62 anarawdata.param(
'on_2d0',
True)
63 anarawdata.param(
'on_2d1',
True)
64 anarawdata.param(
'on_2d2',
True)
65 anarawdata.param(
'on_2d3',
True)
66 anarawdata.param(
'on_gdl',
True)
67 anarawdata.param(
'on_sl5',
True)
68 anarawdata.param(
'on_sl6',
True)
69 anarawdata.param(
'on_sl8',
False)
70 anarawdata.param(
'on_etf',
False)
71 anarawdata.param(
'on_grl',
False)
72 anarawdata.param(
'on_nn0',
True)
73 anarawdata.param(
'on_nn1',
True)
74 anarawdata.param(
'on_nn2',
True)
75 anarawdata.param(
'on_nn3',
True)
76 anarawdata.param(
'on_3d0',
True)
77 anarawdata.param(
'on_3d1',
True)
78 anarawdata.param(
'on_3d2',
True)
79 anarawdata.param(
'on_3d3',
True)
80 anarawdata.param(
'on_top',
True)
81 anarawdata.param(
'scale_top', 32)
84 main = b2.create_path()
87 main.add_module(input)
88 main.add_module(anarawdata)
91 anarawdata.param(
'histRecord',
False)
93 if not os.path.isdir(
'rawdatahist'):
94 os.mkdir(
'rawdatahist')
96 histo = b2.register_module(
'HistoManager')
97 histo.param(
"histoFileName",
"rawdatahist/raw.%s.root" % basename)
98 main.add_module(histo)