ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/runAll.sh
Revision: 1.23
Committed: Wed Jan 23 13:36:03 2013 UTC (12 years, 3 months ago) by bortigno
Content type: application/x-sh
Branch: MAIN
CVS Tags: workingVersionAfterHCP
Changes since 1.22: +0 -4 lines
Log Message:
removed useless variables

File Contents

# Content
1 #!/bin/bash
2
3 #Input argument:
4 #sample you want to run on. It has to match the naming in sample.info.
5 sample=$1
6 #sqrt(s) you want to run
7 energy=$2
8
9 task=$3
10
11 if [ $# -lt 3 ]
12 then
13 echo "ERROR: You passed " $# "arguments while the script needs at least 3 arguments."
14 echo "Exiting..."
15 echo " ---------------------------------- "
16 echo " Usage : ./runAll.sh sample energy task"
17 echo " ---------------------------------- "
18 exit
19 fi
20
21 #Set the environment for the batch job execution
22
23 #cd /shome/peller/CMSSW_5_2_4_patch4/src/
24 # this doesnt work for me..?
25
26 cd $CMSSW_BASE/src/
27 source /swshare/psit3/etc/profile.d/cms_ui_env.sh
28 export SCRAM_ARCH="slc5_amd64_gcc462"
29 source $VO_CMS_SW_DIR/cmsset_default.sh
30 eval `scramv1 runtime -sh`
31 export LD_PRELOAD="libglobus_gssapi_gsi_gcc64pthr.so.0":${LD_PRELOAD}
32
33 mkdir $TMPDIR
34
35 #back to the working dir
36 cd -
37
38 MVAList=`python << EOF
39 import os
40 from myutils import BetterConfigParser
41 config = BetterConfigParser()
42 config.read('./${energy}config/training')
43 print config.get('MVALists','List_for_submitscript')
44 EOF`
45
46 #Run the scripts
47
48 if [ $task = "prep" ]; then
49 ./prepare_environment_with_config.py -C ${energy}config/samples_nosplit.cfg -C ${energy}config/paths
50 fi
51 if [ $task = "sys" ]; then
52 ./write_regression_systematics.py -S $sample -C ${energy}config/general -C ${energy}config/paths
53 fi
54 if [ $task = "eval" ]; then
55 ./evaluateMVA.py -D $MVAList -S $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
56 fi
57 if [ $task = "syseval" ]; then
58 ./write_regression_systematics.py -S $sample -C ${energy}config/general -C ${energy}config/paths
59 ./evaluateMVA.py -D $MVAList -S $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/training
60 fi
61 if [ $task = "plot" ]; then
62 ./tree_stack.py -R $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/plots
63 fi
64 if [ $task = "dc" ]; then
65 ./workspace_datacard.py -V $sample -C ${energy}config/general -C ${energy}config/paths -C ${energy}config/cuts -C ${energy}config/datacards
66 fi
67
68 rm -rf $TMPDIR