ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/submitThem.py
(Generate patch)

Comparing UserCode/VHbb/python/submitThem.py (file contents):
Revision 1.20 by peller, Tue Oct 9 13:40:55 2012 UTC vs.
Revision 1.26 by bortigno, Wed Jan 23 13:25:16 2013 UTC

# Line 1 | Line 1
1   #! /usr/bin/env python
2 import os,shutil,sys,pickle,subprocess,ROOT
2   from optparse import OptionParser
3 < from BetterConfigParser import BetterConfigParser
5 < from samplesclass import sample
6 < import getpass
3 > import sys
4  
5   parser = OptionParser()
6   parser.add_option("-T", "--tag", dest="tag", default="",
# Line 15 | Line 12 | parser.add_option("-M", "--mass", dest="
12   parser.add_option("-S","--samples",dest="samples",default="",
13                        help="samples you want to run on")
14  
18
15   (opts, args) = parser.parse_args(sys.argv)
16 +
17 + import os,shutil,pickle,subprocess,ROOT
18 + from myutils import BetterConfigParser, sample, parse_info
19 + import getpass
20 +
21   if opts.tag == "":
22          print "Please provide tag to run the analysis with, example '-T 8TeV' uses config8TeV and pathConfig8TeV to run the analysis."
23          sys.exit(123)
# Line 29 | Line 30 | if opts.task == "":
30   samplesList=opts.samples.split(",")
31  
32   en = opts.tag
33 < configs = ['config%s'%(en),'pathConfig%s'%(en)]
33 > configs = ['%sconfig/general'%(en),'%sconfig/paths'%(en),'%sconfig/plots'%(en),'%sconfig/training'%(en),'%sconfig/datacards'%(en),'%sconfig/cuts'%(en)]
34          
35   print configs
36   config = BetterConfigParser()
# Line 67 | Line 68 | if opts.task == 'plot':
68  
69   if not opts.task == 'prep':
70      path = config.get("Directories","samplepath")
71 <    infofile = open(path+'/env/samples.info','r')
72 <    info = pickle.load(infofile)
72 <    infofile.close()
73 <
71 >    samplesinfo = config.get("Directories","samplesinfo")
72 >    info = parse_info(samplesinfo,path)
73  
74   if opts.task == 'plot':
75 <    repDict['queue'] = 'short.q'
75 >    repDict['queue'] = 'all.q'
76      for item in Plot_vars:
77          submit(item,repDict)
78  
79   elif opts.task == 'dc':
80 <    repDict['queue'] = 'short.q'
80 >    repDict['queue'] = 'all.q'
81      for item in DC_vars:
82 <        if 'ZH%s'%opts.mass in item and opts.tag in item:
82 >        if 'ZH%s'%opts.mass in item:
83              submit(item,repDict)
84 <        elif 'ZH' in item and opts.tag in item and opts.mass == 'all':
84 >        elif 'ZH' in item and opts.mass == 'all':
85              submit(item,repDict)
86              
87   elif opts.task == 'prep':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines