14d = datetime.datetime.today()
15print(d.strftime(
'job start: %Y-%m-%d %H:%M:%S\n'))
21inputs = str(sys.argv[1]) +
"/" + str(sys.argv[2]) +
"_" + str(sys.argv[3]) +
"*.root"
24outfile = str(sys.argv[4]) +
"/" + str(sys.argv[2]) +
"_" + str(sys.argv[3]) +
".root"
28b2.set_log_level(b2.LogLevel.WARNING)
29seed = str(sys.argv[5])
31b2.set_random_seed(int(seed))
33ethres = str(sys.argv[6])
34print(
'thres: ', ethres)
35erange = str(sys.argv[7])
36print(
'range: ', erange)
37sampletime = str(sys.argv[8])
38print(
'sample time: ', sampletime)
41simpleinput = b2.register_module(
'RootInput')
42simpleinput.param(
'inputFileNames', inputs)
45histo = b2.register_module(
"HistoManager")
46histo.param(
'histoFileName', outfile)
52gearbox = b2.register_module(
'Gearbox')
53gearbox.param(
'fileName',
'/geometry/Beast2_phase1.xml')
55detector = b2.register_module(
'QcsmonitorStudy')
56detector.param(
'Ethres', float(ethres))
57detector.param(
'Erange', float(erange))
58detector.param(
'SampleTime', float(sampletime))
61progress = b2.register_module(
'Progress')
64main = b2.create_path()
65main.add_module(simpleinput)
66main.add_module(gearbox)
67main.add_module(detector)
69main.add_module(progress)
73print(
'Event Statistics:')
76d = datetime.datetime.today()
77print(d.strftime(
'job finish: %Y-%m-%d %H:%M:%S\n'))