forked from jedori0228/HNWR_Plotter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
89 lines (70 loc) · 3.44 KB
/
setup.sh
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
86
87
88
89
#!/bin/bash
export CATANVERSION="Run2Legacy_v4__Default"
export PLOTTER_WORKING_DIR=`pwd`
if [[ $HOSTNAME == "jskim-OptiPlex-9020" ]]; then
#export PLOT_PATH=/home/jskim/cernbox/www/HNWR_13TeV/
export PLOT_PATH=/home/jskim/Dropbox/HNWR_13TeV/plots/
export WWW_PLOT_PATH=/var/www/html/HNWR_13TeV/
alias pl='rsync -auv --delete-excluded '$PLOT_PATH/$CATANVERSION' '$WWW_PLOT_PATH
alias plforce='rsync -auv -I --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
elif [[ $HOSTNAME == *"lxplus"* ]]; then
export CMS_PATH=/cvmfs/cms.cern.ch
source $CMS_PATH/cmsset_default.sh
export SCRAM_ARCH=slc6_amd64_gcc630
cd /cvmfs/cms.cern.ch/slc6_amd64_gcc630/cms/cmssw/CMSSW_9_4_4/src/
eval `scramv1 runtime -sh`
cd -
source /cvmfs/cms.cern.ch/slc6_amd64_gcc630/cms/cmssw/CMSSW_9_4_4/external/slc6_amd64_gcc630/bin/thisroot.sh
export PLOT_PATH=$PLOTTER_WORKING_DIR/output/
export WWW_PLOT_PATH=/eos/user/j/jskim/www/HNWR_13TeV/
alias pl='rsync -auv --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
alias plforce='rsync -auv -I --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
elif [[ $HOSTNAME == *"tamsa1"* ]] || [[ $HOSTNAME == *"tamsa2"* ]] ; then
#### use cvmfs for root ####
export CMS_PATH=/cvmfs/cms.cern.ch
source $CMS_PATH/cmsset_default.sh
export SCRAM_ARCH=slc7_amd64_gcc900
export cmsswrel='cmssw-patch/CMSSW_10_4_0_patch1'
export cmsswrel='cmssw/CMSSW_11_1_0_pre6'
cd /cvmfs/cms.cern.ch/$SCRAM_ARCH/cms/$cmsswrel/src
echo "@@@@ SCRAM_ARCH = "$SCRAM_ARCH
echo "@@@@ cmsswrel = "$cmsswrel
echo "@@@@ scram..."
eval `scramv1 runtime -sh`
cd -
source /cvmfs/cms.cern.ch/$SCRAM_ARCH/cms/$cmsswrel/external/$SCRAM_ARCH/bin/thisroot.sh
export PLOT_PATH=$PLOTTER_WORKING_DIR/output/
export WWW_PLOT_PATH=/eos/user/j/jskim/www/HNWR_13TeV/
alias pl='rsync -auv --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
alias plforce='rsync -auv -I --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
elif [[ $HOSTNAME == *"cms1"* ]] || [[ $HOSTNAME == *"cms2"* ]] ; then
#### use cvmfs for root ####
export CMS_PATH=/cvmfs/cms.cern.ch
source $CMS_PATH/cmsset_default.sh
export SCRAM_ARCH=slc6_amd64_gcc700
export cmsswrel='cmssw-patch/CMSSW_10_4_0_patch1'
#export cmsswrel='cmssw/CMSSW_10_5_0'
cd /cvmfs/cms.cern.ch/$SCRAM_ARCH/cms/$cmsswrel/src
echo "@@@@ SCRAM_ARCH = "$SCRAM_ARCH
echo "@@@@ cmsswrel = "$cmsswrel
echo "@@@@ scram..."
eval `scramv1 runtime -sh`
cd -
source /cvmfs/cms.cern.ch/$SCRAM_ARCH/cms/$cmsswrel/external/$SCRAM_ARCH/bin/thisroot.sh
export PLOT_PATH=$PLOTTER_WORKING_DIR/output/
export WWW_PLOT_PATH=/eos/user/j/jskim/www/HNWR_13TeV/
alias pl='rsync -auv --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
alias plforce='rsync -auv -I --delete-excluded output/'$CATANVERSION' '$WWW_PLOT_PATH
fi
export FILE_PATH=$PLOTTER_WORKING_DIR/rootfiles/
export PYTHONPATH=$PYTHONPATH:$PLOTTER_WORKING_DIR/python/:$PLOTTER_WORKING_DIR/include/
export SCRIPT_DIR=$PLOTTER_WORKING_DIR/script/
export ROOT_INCLUDE_PATH=$ROOT_INCLUDE_PATH:$PLOTTER_WORKING_DIR/include/:$PLOTTER_WORKING_DIR/src/
alias lqout='cd '$PLOT_PATH
alias webout='cd '$WWW_PLOT_PATH
alias makehtml='make_html_master --To=HNWR_13TeV'
alias makehtml2='make_html_master --To=HNWR_13TeV --From=*/'
mkdir -p $FILE_PATH/$CATANVERSION
CurrentGitBranch=`git branch | grep \* | cut -d ' ' -f2`
source bin/BashColorSets.sh
printf "@@@@ Current HNWR_Plotter branch : "${BGreen}$CurrentGitBranch${Color_Off}"\n"