5 |
|
from array import * |
6 |
|
from optparse import OptionParser |
7 |
|
from OSUT3Analysis.Configuration.configurationOptions import * |
8 |
+ |
from OSUT3Analysis.Configuration.processingUtilities import * |
9 |
|
|
10 |
|
parser = OptionParser() |
11 |
+ |
parser = set_commandline_arguments(parser) |
12 |
+ |
(arguments, args) = parser.parse_args() |
13 |
|
|
14 |
< |
parser.add_option("-l", "--localConfig", dest="localConfig", |
12 |
< |
help="local configuration file") |
13 |
< |
|
14 |
< |
parser.add_option("-c", "--condorDir", dest="condorDir", |
15 |
< |
help="condor output directory") |
16 |
< |
|
17 |
< |
(options, args) = parser.parse_args() |
18 |
< |
|
19 |
< |
if options.localConfig: |
14 |
> |
if arguments.localConfig: |
15 |
|
sys.path.append(os.getcwd()) |
16 |
< |
exec("from " + options.localConfig.rstrip('.py') + " import *") |
16 |
> |
exec("from " + arguments.localConfig.rstrip('.py') + " import *") |
17 |
|
|
18 |
< |
if options.condorDir: |
24 |
< |
condor_dir = "condor/%s" % options.condorDir |
25 |
< |
else: #get most recent condor submission directory |
26 |
< |
dir_list = [] |
27 |
< |
for directory in os.listdir("./condor/"): |
28 |
< |
if directory.find("condor_") is not -1: |
29 |
< |
dir_list.append(directory) |
30 |
< |
if len(dir_list) is 0: |
31 |
< |
sys.exit("Cannot find last condor working directory") |
32 |
< |
dir_list.sort(reverse=True) |
33 |
< |
condor_dir = "condor/%s" % dir_list[0] |
18 |
> |
condor_dir = set_condor_output_dir(arguments) |
19 |
|
|
20 |
|
from ROOT import TFile, gROOT, gStyle, gDirectory, TStyle, THStack, TH1F, TCanvas, TString, TLegend, TArrow, THStack, TIter, TKey, TPaveLabel |
21 |
|
|