6 from functools
import reduce
9 parser = argparse.ArgumentParser()
10 parser.add_argument(
'type', help=
'dqm or qam', type=str)
11 args = parser.parse_args()
17 files = glob.glob(dir +
'*/all/dst/sub00/dst.cosmic.*.root')
22 run = int((f.split(
'/'))[-1].split(
'.')[3])
27 runs = sorted(list(set(runs)))
35 dir =
'/hsm/belle2/bdata/Data/release-00-09-01/DB00000266/GCR1/prod00000001/e{0:0>4}/cosmics/'.format(exp)
40 runs = getRunList(dir)
45 logfile =
'dqm.cosmic.{0:0>4}.{1:0>5}.log'.format(exp, run)
46 command =
' '.join([
'basf2 CDCHistMaker.py', str(exp), str(run),
'>&', logfile])
48 logfile =
'qam.cosmic.{0:0>4}.{1:0>5}.log'.format(exp, run)
49 command =
' '.join([
'basf2 QAMHistMaker.py', str(exp), str(run),
'>&', logfile])
51 print(
'Specify the type : dqm/qam')
57 subprocess.run([
"bsub",
"-q",
"l", command])