ROOTPWA
step6.sh
Go to the documentation of this file.
1 # this script generates the key files
2 # should be called by run_X_PWA_analysis.sh script
3 # author: P.Jasinski Promme@web.de , jasinski@kph.uni-mainz.de
4 
5 source ${ROOTPWA}/scripts/pwa_Kpipi_example/set_workspace_var.sh
6 
7 echo -e "\n **************** part 6 ******************"
8 echo " *${STEP_NAME[5]}*"
9 echo -e " ******************************************\n"
10 
11 if [ -e ${KPIPI_KEYFILE_DIR} ];
12 then
13  echo -e "\E[37;31m \n The directory "; tput sgr0
14  echo -e "\E[37;34m ${KPIPI_KEYFILE_DIR}"; tput sgr0
15  echo -e "\E[37;31m exists already. Remove the contents (Y/N)? "; tput sgr0
16  read CONTINUE
17  if [ ${CONTINUE} == "Y" ];
18  then
19  echo -e "\n cleaning up ${KPIPI_KEYFILE_DIR}\n"
20  rm -rf ${KPIPI_KEYFILE_DIR}
21  else
22  echo -e "\E[37;31m \n Please specify a new key file folder! "; tput sgr0
23  echo -e "\n Aborting this script"; tput sgr0
24  return 0
25  fi
26 fi
27 mkdir ${KPIPI_KEYFILE_DIR}
28 
29 # currently the key file generator must be compiled in the path containing the generators
30 cd ${KPIPI_GENERATOR_PATH}
31 mkdir backup # backup existing keyfiles in this folder (that should anyhow not last there)
32 mv ./*.key ./backup/
33 root -l -q -b ${KPIPI_KEYFILE_GENERATOR}+\(true,\"../keyfiles/keyKpipi/testEventsKpipi.evt\",\"./pdgTable.txt\",\"${KPIPI_KEYFILE_DIR}\"\)
34 echo " moving key files to destination folder if not done already "
35 mv ./*.key ${KPIPI_KEYFILE_DIR}/
36 rm -f ./*.key.C
37 cd -
38