ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/Configuration/scripts/submitToCondor.py
Revision: 1.3
Committed: Fri Feb 8 09:34:16 2013 UTC (12 years, 2 months ago) by ahart
Content type: text/x-python
Branch: MAIN
Changes since 1.2: +1 -1 lines
Log Message:
Added a dictionary in configurationOptions.py which is used submitToCondor.py to set the maximum number of events to process in a sample.

File Contents

# User Rev Content
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)