1 |
lantonel |
1.1 |
#!/usr/bin/env python
|
2 |
|
|
import os
|
3 |
|
|
import sys
|
4 |
|
|
import datetime
|
5 |
|
|
from optparse import OptionParser
|
6 |
|
|
|
7 |
lantonel |
1.2 |
from OSUT3Analysis.Configuration.configurationOptions import *
|
8 |
|
|
from OSUT3Analysis.Configuration.processingUtilities import *
|
9 |
lantonel |
1.1 |
|
10 |
|
|
parser = OptionParser()
|
11 |
|
|
parser = set_commandline_arguments(parser)
|
12 |
|
|
|
13 |
|
|
(options, args) = parser.parse_args()
|
14 |
|
|
|
15 |
|
|
if options.localConfig:
|
16 |
|
|
sys.path.append(os.getcwd())
|
17 |
|
|
exec("from " + options.localConfig.rstrip('.py') + " import *")
|
18 |
|
|
|
19 |
|
|
condor_dir = set_condor_submit_dir(options)
|
20 |
|
|
|
21 |
|
|
os.system("mkdir %s" % (condor_dir))
|
22 |
|
|
|
23 |
|
|
split_datasets = split_composite_datasets(datasets)
|
24 |
|
|
|
25 |
|
|
for dataset in split_datasets:
|
26 |
|
|
output_dir = "%s/%s" % (condor_dir, dataset)
|
27 |
ahart |
1.3 |
command = "osusub -m %d %s %s %s %s" % (maxEvents[dataset], dataset_names[dataset], config_file, output_dir, nJobs[dataset])
|
28 |
lantonel |
1.1 |
print command
|
29 |
|
|
os.system(command)
|