1 |
bortigno |
1.12 |
#! /usr/bin/env python
|
2 |
|
|
import os, pickle, sys, ROOT
|
3 |
nmohr |
1.8 |
from optparse import OptionParser
|
4 |
peller |
1.18 |
from myutils import BetterConfigParser, copytree, printc, sample, parse_info
|
5 |
bortigno |
1.1 |
|
6 |
peller |
1.11 |
argv = sys.argv
|
7 |
bortigno |
1.1 |
|
8 |
|
|
#get files info from config
|
9 |
nmohr |
1.8 |
parser = OptionParser()
|
10 |
peller |
1.18 |
#parser.add_option("-I", "--inPath", dest="pathIn", default="",
|
11 |
|
|
# help="path to the input files")
|
12 |
|
|
#parser.add_option("-O", "--outPath", dest="pathOut", default="",
|
13 |
|
|
# help="path to the output files")
|
14 |
|
|
parser.add_option("-C", "--config", dest="config", default=[], action="append",
|
15 |
|
|
help="directory config")
|
16 |
peller |
1.9 |
|
17 |
peller |
1.10 |
(opts, args) = parser.parse_args(argv)
|
18 |
peller |
1.9 |
|
19 |
peller |
1.18 |
#pathIN=opts.pathIn
|
20 |
|
|
#pathOUT=opts.pathOut
|
21 |
bortigno |
1.12 |
|
22 |
peller |
1.18 |
config = BetterConfigParser()
|
23 |
|
|
config.read(opts.config)
|
24 |
bortigno |
1.17 |
|
25 |
peller |
1.18 |
pathIN = config.get('Directories','PREPin')
|
26 |
|
|
pathOUT = config.get('Directories','PREPout')
|
27 |
|
|
samplesinfo=config.get('Directories','samplesinfo')
|
28 |
|
|
sampleconf = BetterConfigParser()
|
29 |
|
|
sampleconf.read(samplesinfo)
|
30 |
|
|
prefix=sampleconf.get('General','prefix')
|
31 |
nmohr |
1.8 |
|
32 |
peller |
1.18 |
info = parse_info(samplesinfo,pathIN)
|
33 |
nmohr |
1.3 |
|
34 |
peller |
1.18 |
for job in info:
|
35 |
|
|
copytree(pathIN,pathOUT,prefix,job.prefix,job.identifier,'',job.treecut)
|