6 import Alignment.MillePedeAlignmentAlgorithm.mpslib.Mpslibclass
as mpslib
9 parser =
argparse.ArgumentParser(description=
'Merge millePedeMonitor-root-files from eos, that are from the same dataset.',
12 parser.add_argument(
'eosDir',
14 help =
'path of the eos directory')
16 args = parser.parse_args()
20 lib = mpslib.jobdatabase()
22 for i
in xrange(lib.nJobs):
28 for i
in xrange(lib.nJobs):
29 if lib.JOBSP3[i]
not in items:
30 items.append(lib.JOBSP3[i])
32 for i
in xrange(len(items)):
33 occurences.append(lib.JOBSP3.count(items[i]))
37 for i
in xrange(len(items)):
39 command +=
'monitormerge_'+items[i]+
'.root ' 40 for j
in xrange(occurences[i]):
41 os.system(
'cp '+eosDir+
'/millePedeMonitor%03d.root .' % (counter+j+1))
42 command +=
'millePedeMonitor%03d.root ' % (counter+j+1)
44 for j
in xrange(occurences[i]):
45 os.system(
'rm millePedeMonitor%03d.root' % (counter+j+1))
46 counter += occurences[i]