1 |
|
#! /usr/bin/env python |
2 |
< |
import os,sys,pickle,subprocess |
2 |
> |
import os,shutil,sys,pickle,subprocess,ROOT |
3 |
|
from optparse import OptionParser |
4 |
|
from BetterConfigParser import BetterConfigParser |
5 |
|
from samplesclass import sample |
6 |
+ |
import getpass |
7 |
+ |
|
8 |
|
|
9 |
|
parser = OptionParser() |
10 |
|
parser.add_option("-T", "--tag", dest="tag", default="", |
19 |
|
print configs |
20 |
|
config = BetterConfigParser() |
21 |
|
config.read(configs) |
22 |
+ |
btagLibrary = config.get('BTagReshaping','library') |
23 |
+ |
submitDir = os.getcwd() |
24 |
+ |
os.chdir(os.path.dirname(btagLibrary)) |
25 |
+ |
if not os.path.exists(btagLibrary): |
26 |
+ |
ROOT.gROOT.LoadMacro('%s+'%btagLibrary.replace('_h.so','.h')) |
27 |
+ |
shutil.copyfile(os.path.basename(btagLibrary),'/scratch/%s/%s'%(getpass.getuser(),os.path.basename(btagLibrary))) |
28 |
+ |
shutil.copyfile('/scratch/%s/%s'%(getpass.getuser(),os.path.basename(btagLibrary)),btagLibrary) |
29 |
+ |
os.chdir(submitDir) |
30 |
|
logPath = config.get("Directories","logpath") |
31 |
|
repDict = {'en':en,'logpath':logPath,'job':''} |
32 |
|
def submit(job,repDict): |