24 def storeSteering(name, tag):
26 baseDir =
'/group/belle2/dataprod/dp_managers/ddossett/airflow/output_data'
28 def getRun(x):
return int(re.findall(
'[0-9]*$', x)[0])
31 if not isinstance(tag, list):
33 res = glob(baseDir+
'/'+tag+
'/mumu_2trk/e12/*')
38 res += glob(baseDir+
'/'+t+
'/mumu_2trk/e12/*')
40 res = sorted(res, key=getRun)
42 fOut = open(name,
'w')
44 fOut.write(
'{"hlt_mumu": [')
46 for i, r
in enumerate(res):
48 fOut.write(
'["' + r +
'", [12, '+str(n)+
']]')
57 def storeSteering2(name, tag):
58 baseDir =
'/group/belle2/dataprod/Data/OfficialReco/proc11/e00'+tag+
'/4S/r*/skim/hlt_mumu_2trk/mdst'
60 baseDir =
'/group/belle2/dataprod/Data/release-04-02-04/DB00001113/' +\
61 'bucket12/e0012/4S_offres/GoodRuns/r*/skim/hlt_mumu_2trk/mdst'
63 baseDir =
'/group/belle2/dataprod/Data/OfficialReco/proc11/e0008/4S_offres/r*/skim/hlt_mumu_2trk/mdst'
66 baseDir =
'/group/belle2/dataprod/Data/OfficialReco/proc11/e0008/4S_scan/r*/skim/hlt_mumu_2trk/mdst'
71 def getRun(r):
return int(re.findall(
'/r[0-9]*/', r)[0][2:-1])
73 res = sorted(res, key=getRun)
75 fOut = open(name,
'w')
77 fOut.write(
'{"hlt_mumu": [')
79 for i, r
in enumerate(res):
81 exp = 12
if tag ==
'bucket12' else int(tag)
82 fOut.write(
'["' + r +
'", ['+str(exp)+
', '+str(n)+
']]')
92 storeSteering2(
'steerings/input_data_exp8off.json',
'08off')
93 storeSteering2(
'steerings/input_data_exp8scan.json',
'08scan')
95 storeSteering2(
'steerings/input_data_exp7.json',
'07')
96 storeSteering2(
'steerings/input_data_exp8.json',
'08')
97 storeSteering2(
'steerings/input_data_exp10.json',
'10')
99 storeSteering(
'steerings/input_data_bucket9.json', 71)
100 storeSteering(
'steerings/input_data_bucket10.json', 91)
101 storeSteering(
'steerings/input_data_bucket11.json', [110, 112])
102 storeSteering2(
'steerings/input_data_bucket12.json',
'bucket12')
103 storeSteering(
'steerings/input_data_bucket13.json', 139)
104 storeSteering(
'steerings/input_data_bucket14.json', 166)
105 storeSteering(
'steerings/input_data_bucket15.json', 192)
static ExpRun getRun(std::map< ExpRun, std::pair< double, double >> runs, double t)
Get exp number + run number from time.