20 from optparse
import OptionParser
22 from basf2
import conditions
23 conditions.override_globaltags()
24 conditions.append_globaltag(
'online')
25 conditions.append_globaltag(
'ARICH_phase3_test')
29 b2.set_log_level(b2.LogLevel.INFO)
31 parser = OptionParser()
32 parser.add_option(
'-i',
'--inputpath', dest=
'path', default=
'')
33 (options, args) = parser.parse_args()
35 input = b2.register_module(
'SeqRootInput')
36 file_list = [options.path + f
for f
in os.listdir(options.path)
if f.endswith(
'.sroot')]
38 input.param(
'inputFileNames', file_list)
40 histo = b2.register_module(
'HistoManager')
42 cal = b2.register_module(
'ARICHRateCal')
43 cal.param(
"nrun", 100)
44 cal.param(
"nevents", 1000)
45 cal.param(
"dth", 0.0096)
46 cal.param(
"th0", -0.48)
47 cal.param(
"internal",
True)
49 unpack = b2.register_module(
'ARICHUnpacker')
53 convert = b2.register_module(
'Convert2RawDet')
54 output = b2.register_module(
'RootOutput')
55 progress = b2.register_module(
'Progress')
58 main = b2.create_path()
61 main.add_module(input)
62 main.add_module(histo)
63 main.add_module(convert)
64 main.add_module(unpack)
66 main.add_module(progress)