ROOTPWA
step1.sh
Go to the documentation of this file.
1 # this script loads raw data from an (internet) source
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 1 ******************"
8 echo " *${STEP_NAME[0]}*"
9 echo -e " ******************************************\n"
10 # real data
11 if [ -f ${KPIPI_RAW_FILE_DIR}/${KPIPI_RAW_FILE} ]
12 then
13  echo -e "\n root file ${KPIPI_RAW_FILE_DIR}/${KPIPI_RAW_FILE} "
14  echo " seems to exist "
15  echo -e " skipping copy procedure! \n"
16 else
17  if which wget >/dev/null; then
18  echo -e "\n wget found"
19  else
20  echo -e '\E[37;31m \n wget not found: Please download'
21  echo -e "\E[37;34m ${KPIPI_WEB_FILE}"
22  echo -e "\E[37;31m with a webbrowser to "
23  echo -e "\E[37;34m ${KPIPI_RAW_FILE_DIR}/${KPIPI_RAW_FILE} "
24  echo -e "\n Aborting this script"; tput sgr0
25  return 0
26  fi
27 
28  echo " copying file from ${KPIPI_WEB_FILE} to ${KPIPI_RAW_FILE_DIR}/${KPIPI_RAW_FILE}"
29 
30  wget ${KPIPI_WEB_FILE} -O ${KPIPI_RAW_FILE_DIR}/${KPIPI_RAW_FILE}
31  #return 0
32 fi
33 # MC acceptance data
34 if [ -f ${KPIPI_MC_FILE_DIR}/${KPIPI_MC_FILE} ]
35 then
36  echo -e "\n root file ${KPIPI_MC_FILE_DIR}/${KPIPI_MC_FILE} "
37  echo " seems to exist "
38  echo -e " skipping copy procedure! \n"
39 else
40  if which wget >/dev/null; then
41  echo -e "\n wget found"
42  else
43  echo -e '\E[37;31m \n wget not found: Please download'
44  echo -e "\E[37;34m ${KPIPI_WEB_MC_FILE}"
45  echo -e "\E[37;31m with a webbrowser to "
46  echo -e "\E[37;34m ${KPIPI_MC_FILE_DIR}/${KPIPI_MC_FILE} "
47  echo -e "\n Aborting this script"; tput sgr0
48  return 0
49  fi
50 
51  echo " copying file from ${KPIPI_WEB_MC_FILE} to ${KPIPI_MC_FILE_DIR}/${KPIPI_MC_FILE}"
52 
53  wget ${KPIPI_WEB_MC_FILE} -O ${KPIPI_MC_FILE_DIR}/${KPIPI_MC_FILE}
54  #return 0
55 fi