diff --git a/.gitignore b/.gitignore index 3703ad4..1a20a02 100644 --- a/.gitignore +++ b/.gitignore @@ -20,38 +20,16 @@ *.out *.app -# files & dirs created during the installation +# directories and files created during the installation +AssociationUtils/ +Mt2/ +RootCoreBin/ +SUSYTools/ +SusyCommon/ +SusyNtuple/ +TauAnalysisTools/ +xAODMuon/ install.log -prod/ApplyJetCalibration/ -prod/ApplyJetResolutionSmearing/ -prod/CalibrationDataInterface/ -prod/DGTriggerReweight/ -prod/ElectronEfficiencyCorrection/ -prod/GoodRunsLists/ -prod/HistFitterTree/ -prod/JVFUncertaintyTool/ -prod/JetResolution/ -prod/JetSelectorTools/ -prod/JetUncertainties/ -prod/LeptonTruthTools/ -prod/MissingETUtility/ -prod/Mt2/ -prod/MultiLep/ -prod/MuonEfficiencyCorrections/ -prod/MuonMomentumCorrections/ -prod/ObjectSelectorCore/ -prod/PATCore/ -prod/PileupReweighting/ -prod/ReweightUtils/ -prod/RootCore/ -prod/SUSYTools/ -prod/SignificanceCalculator/ -prod/TauCorrUncert/ -prod/TauCorrections/ -prod/TileTripReader/ -prod/TopTag/ -prod/TrigMuonEfficiency/ -prod/TrigRootAnalysis/ -prod/TriggerMatch/ -prod/egammaAnalysisUtils/ -prod/egammaEvent/ +rcSetup.csh +rcSetup.sh +.RootCoreBin diff --git a/README.md b/README.md index f2aa8a6..e8623ec 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ Prerequisites: Follow these commands to set up an area to read SusyNtuples. ``` -git clone git@github.com:gerbaudo/susynt-write.git --branch xaod +git clone https://github.com/susynt/susynt-write.git cd susynt-write source bash/setup_release.sh -./bash/setup_area.sh 2>&1 | tee install.log +./bash/setup_area.sh [--dev] 2>&1 | tee install.log rc find_packages rc compile 2>&1 | tee compile.log ``` @@ -37,8 +37,10 @@ cd susynt-write source bash/setup_release.sh ``` -Note1: the submission of the jobs must be performed from a +**Note1**: the submission of the jobs must be performed from a different directory from the one where the packages are compiled. -Note2: if you want to submit a production, you should use the -`--stable` option of `setup_area.sh`. \ No newline at end of file +**Note2**: By default you'll get the most recent stable tags of +SusyCommon and SusyNtuple. If you want to develop code, you should +replace `https://github.com/` with `git@github.com:` and run +`setup_area.sh` with the `--dev` option. \ No newline at end of file diff --git a/bash/README b/bash/README deleted file mode 100644 index 568b544..0000000 --- a/bash/README +++ /dev/null @@ -1,17 +0,0 @@ -git clone git@github.com:gerbaudo/susynt-write.git -cd susynt-write -git checkout -b xaod origin/xaod - -================================================== -Follow these instructions to install from fresh: - -bash/setup_area.sh 2>&1 | tee install.log - -Then -cd prod - -//Do this each time you setup a new terminal. -source sourceme.sh - -cd SusyCommon/run -./test_and_log.sh diff --git a/bash/setup_area.sh b/bash/setup_area.sh index 1b80f52..4f636f8 100755 --- a/bash/setup_area.sh +++ b/bash/setup_area.sh @@ -58,59 +58,72 @@ function checkout_packages_external { svn co ${SVNOFF}/PhysicsAnalysis/AnalysisCommon/IsolationSelection-00-01-00 IsolationSelection # check out this tag of TauAnalysisTools so things work svn co ${SVNOFF}/PhysicsAnalysis/TauID/TauAnalysisTools/tags/TauAnalysisTools-00-00-50 TauAnalysisTools - - # SusyNtuple dependencies - svn co ${SVNWEAK}/Mt2/tags/Mt2-00-00-01 Mt2 } function checkout_packages_uci { - local dev_or_stable="$1" # whether we should checkout the dev branch or the latest production tags - cd ${PROD_DIR} - git clone git@github.com:gerbaudo/SusyNtuple.git SusyNtuple - cd SusyNtuple - if [ "${dev_or_stable}" = "--stable" ] + local dev_or_stable="$1" + local GIT="" + local tag_common="" + local tag_ntuple="" + if [[ "${dev_or_stable}" = "dev" ]] then - git checkout SusyNtuple-00-03-01 # tag n0213-02 - else - git checkout -b master origin/master - fi - cd - - git clone git@github.com:gerbaudo/SusyCommon.git SusyCommon - cd SusyCommon - if [ "${dev_or_stable}" = "--stable" ] + GIT="git@github.com:" # read+write + tag_common="master" + tag_ntuple="master" + elif [[ "${dev_or_stable}" = "stable" ]] then - git checkout SusyCommon-00-02-10 # tag n0213 + GIT="https://github.com/" # read-only + tag_common="SusyCommon-00-02-10" # tag n0213 + tag_ntuple="SusyNtuple-00-03-01" # tag n0213-02 else - git checkout -b mc15 origin/mc15 + echo "unknown dev_or_stable '${dev_or_stable}'" fi - cd - -} + cd ${PROD_DIR} + git clone ${GIT}susynt/SusyNtuple.git SusyNtuple + git clone ${GIT}susynt/SusyCommon.git SusyCommon + cd ${PROD_DIR}/SusyNtuple && git checkout ${tag_ntuple} + cd ${PROD_DIR}/SusyCommon && git checkout ${tag_common} + cd ${PROD_DIR} +} +#----------------------------------------------------------- function main { - if [ $# -ge 2 ]; then - print_usage - return - elif [ $# -eq 1 ] && [ "$1" == "--help" ]; then + # parse as in + # http://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash + local dev_or_stable="stable" + local help="" + while [[ $# > 0 ]] + do + key="$1" + case $key in + --dev) + dev_or_stable="dev" + ;; + -h|--help) + help=true + ;; + *) + # unknown option + ;; + esac + shift # past argument or value + done + + + if [[ ${help} ]] + then print_usage - return - fi - echo "Starting -- `date`" - # todo: sanity/env checks (probably better off in python) - # if missing_kerberos - # then - # echo "cannot continue" - # return 1 - # else - # echo "checkout and compile" - # fi - prepare_directories - checkout_packages_external - checkout_packages_uci $* - echo "Done -- `date`" - echo "You can now go ahead and compile with:" - echo "rc find_packages" - echo "rc compile 2>&1 | tee compile.log" + else + echo "Starting -- `date`" + prepare_directories + checkout_packages_external + checkout_packages_uci ${dev_or_stable} + echo "Done -- `date`" + echo "You can now go ahead and compile with:" + echo "rc find_packages" + echo "rc compile 2>&1 | tee compile.log" + fi } - +#----------------------------------------------------------- main $*