forked from TreeMaker/TreeMaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·85 lines (73 loc) · 2.37 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·85 lines (73 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash -e
usage(){
EXIT=$1
echo "setup.sh [options]"
echo ""
echo "-f [fork] clone from specified fork (default = TreeMaker)"
echo "-b [branch] clone specified branch (default = Run2_2017)"
echo "-a [protocol] use protocol to clone (default = ssh, alternative = https)"
echo "-j [cores] run CMSSW compilation on # cores (default = 8)"
echo "-h display this message and exit"
exit $EXIT
}
FORK=TreeMaker
BRANCH=Run2_2017
ACCESS=ssh
CORES=8
# process options
while getopts "f:b:a:j:h" opt; do
case "$opt" in
f) FORK=$OPTARG
;;
b) BRANCH=$OPTARG
;;
a) ACCESS=$OPTARG
;;
j) CORES=$OPTARG
;;
h) usage 0
;;
esac
done
# check options
if [ "$ACCESS" = "ssh" ]; then
ACCESS_GITHUB=git@github.com:
ACCESS_GITLAB=ssh://git@gitlab.cern.ch:7999/
elif [ "$ACCESS" = "https" ]; then
ACCESS_GITHUB=https://github.com/
ACCESS_GITLAB=https://gitlab.cern.ch/
else
usage 1
fi
# get CMSSW release
export SCRAM_ARCH=slc6_amd64_gcc630
# cmsrel
CMSSWVER=CMSSW_9_4_10
scram project ${CMSSWVER}
cd ${CMSSWVER}/src/
# cmsenv
eval `scramv1 runtime -sh`
git cms-init
git config gc.auto 0
# DeepAK8 setup
if [ "$ACCESS" = "https" ]; then echo "Needs your CERN username and password: NNKit is being cloned from gitlab"; fi
git clone ${ACCESS_GITLAB}TreeMaker/NNKit.git -b cmssw-improvements-4 --depth 1
cp NNKit/misc/mxnet-predict.xml $CMSSW_BASE/config/toolbox/$SCRAM_ARCH/tools/selected
scram setup mxnet-predict
cp --remove-destination NNKit/misc/lib/libmxnetpredict.so $CMSSW_BASE/external/$SCRAM_ARCH/lib/libmxnetpredict.so
# CMSSW patches
git cms-merge-topic TreeMaker:fixFormulaEvaluator_949 # this one has dependencies, might be in a future 9_4_X release
git cms-merge-topic -u TreeMaker:BoostedDoubleSVTaggerV4-WithWeightFiles-v1_from-CMSSW_9_4_2
git cms-merge-topic -u TreeMaker:storeJERFactorIndex942
git cms-merge-topic -u TreeMaker:AddJetAxis1_942
git cms-merge-topic -u TreeMaker:NjettinessAxis_948
git cms-merge-topic -u TreeMaker:METFixEE2017_949
# outside repositories
git clone ${ACCESS_GITHUB}TreeMaker/JetToolbox.git JMEAnalysis/JetToolbox -b jetToolbox_94X
git clone ${ACCESS_GITHUB}kpedro88/CondorProduction.git Condor/Production
git clone ${ACCESS_GITHUB}${FORK}/TreeMaker.git -b ${BRANCH}
# compile
scram b -j ${CORES}
# extra setup
cd TreeMaker/Production/test/condorSub/
python $CMSSW_BASE/src/Condor/Production/python/linkScripts.py