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