3 from __future__
import print_function
4 from builtins
import range
8 import Alignment.MillePedeAlignmentAlgorithm.mpslib.Mpslibclass
as mpslib
11 parser = argparse.ArgumentParser(description=
'Merge millePedeMonitor-root-files from eos, that are from the same dataset.',
12 formatter_class=argparse.RawDescriptionHelpFormatter)
14 parser.add_argument(
'eosDir',
16 help =
'path of the eos directory')
18 args = parser.parse_args()
22 lib = mpslib.jobdatabase()
24 for i
in range(lib.nJobs):
30 for i
in range(lib.nJobs):
31 if lib.JOBSP3[i]
not in items:
32 items.append(lib.JOBSP3[i])
34 for i
in range(len(items)):
35 occurences.append(lib.JOBSP3.count(items[i]))
39 for i
in range(len(items)):
41 command +=
'monitormerge_'+items[i]+
'.root ' 42 for j
in range(occurences[i]):
43 os.system(
'cp '+eosDir+
'/millePedeMonitor%03d.root .' % (counter+j+1))
44 command +=
'millePedeMonitor%03d.root ' % (counter+j+1)
46 for j
in range(occurences[i]):
47 os.system(
'rm millePedeMonitor%03d.root' % (counter+j+1))
48 counter += occurences[i]
S & print(S &os, JobReport::InputFile const &f)