1 |
|
#! /usr/bin/env python |
2 |
|
import os,shutil,sys,pickle,subprocess,ROOT |
3 |
|
from optparse import OptionParser |
4 |
– |
from BetterConfigParser import BetterConfigParser |
5 |
– |
from samplesclass import sample |
4 |
|
import getpass |
5 |
+ |
from myutils import BetterConfigParser, sample, parse_info |
6 |
|
|
7 |
|
parser = OptionParser() |
8 |
|
parser.add_option("-T", "--tag", dest="tag", default="", |
28 |
|
samplesList=opts.samples.split(",") |
29 |
|
|
30 |
|
en = opts.tag |
31 |
< |
configs = ['config%s'%(en),'pathConfig%s'%(en)] |
31 |
> |
#configs = ['config%s'%(en),'pathConfig%s'%(en)] |
32 |
> |
configs = ['#sconfig/general'%(en),'#sconfig/paths'%(en),'#sconfig/plots'%(en),'#sconfig/training'%(en),'#sconfig/datacards'%(en),'#sconfig/cuts'%(en)] |
33 |
|
|
34 |
|
print configs |
35 |
|
config = BetterConfigParser() |
68 |
|
if not opts.task == 'prep': |
69 |
|
path = config.get("Directories","samplepath") |
70 |
|
samplesinfo = config.get("Directories","samplesinfo") |
71 |
< |
infofile = open(samplesinfo,'r') |
72 |
< |
info = pickle.load(infofile) |
73 |
< |
infofile.close() |
74 |
< |
|
71 |
> |
info = parse_info(samplesinfo,path) |
72 |
|
|
73 |
|
if opts.task == 'plot': |
74 |
|
repDict['queue'] = 'all.q' |