14d = datetime.datetime.today()
15print(d.strftime(
'job start: %Y-%m-%d %H:%M:%S\n'))
23 inputs =
'/home/belle/igal/beast/data/NTP/TPC/' + \
24 str(sys.argv[1]) +
"-" + str(sys.argv[2]) +
"-" + str(sys.argv[3]) +
"/tpc" + str(sys.argv[4]) +
"*.root"
26 outfile = str(sys.argv[5]) +
"/DailyReportOfTPC" + str(sys.argv[4]) +
"_" + \
27 str(sys.argv[1]) + str(sys.argv[2]) + str(sys.argv[3]) +
".root"
29 date = str(sys.argv[1]) + str(sys.argv[2]) + str(sys.argv[3])
31 TPCnb = str(sys.argv[4])
35 print(
" 1/ Create an output directory ")
36 print(
" mkdir output_directory")
37 print(
" 2/ basf2 ./RunTPC_daily_report.py yyyy mm dd TPCposition output_directory")
38 print(
"For example: ")
39 print(
" basf2 ./RunTPC_daily_report.py 2016 05 30 3 output_directory")
49main = b2.create_path()
52simpleinput = b2.register_module(
'RootInput')
53simpleinput.param(
'inputFileNames', inputs)
54main.add_module(simpleinput)
57histo = b2.register_module(
"HistoManager")
58histo.param(
'histoFileName', outfile)
62gearbox = b2.register_module(
'Gearbox')
63gearbox.param(
'fileName',
'/geometry/Beast2_phase1.xml')
64main.add_module(gearbox)
67daily = b2.register_module(
'MicrotpcDailyReport')
68daily.param(
'inputTPCNumber', int(TPCnb))
69daily.param(
'inputReportDate', int(date))
75print(
'Event Statistics:')
78d = datetime.datetime.today()
79print(d.strftime(
'job finish: %Y-%m-%d %H:%M:%S\n'))