Commit 0d9add21 authored by Gernot Maier's avatar Gernot Maier
Browse files

Add copying files list script

parent 3b46bf47
...@@ -70,3 +70,26 @@ uses DIRAC command ...@@ -70,3 +70,26 @@ uses DIRAC command
(this obviously takes quite a while) (this obviously takes quite a while)
## Copy file lists into productions directories
Rename list to be readable by Eventdisplay scripts
e.g.,
```
./copy_file_lists.sh Prod5_LaPalma_AdvancedBaseline_NSB1x $CTA_USER_DATA_DIR/analysis/AnalysisData/FileList_prod5/prod5-LaPalma-20deg/
```
Should copy all *local* lists from ./Prod5_LaPalma_AdvancedBaseline_NSB1x/ and rename them to:
```
electron_180deg.list
electron.list
gamma_cone_0deg.list
gamma_cone_180deg.list
gamma_cone.list
gamma_onSource_0deg.list
gamma_onSource_180deg.list
gamma_onSource.list
proton_0deg.list
proton_180deg.list
proton.list
```
#!/bin/bash
#
# copy file list into the analysis directories
if [ $# -lt 2 ]; then
echo "
copy file lists into the analysis directory
./copy_file_lists.sh <production> <target directory>
"
exit
fi
mkdir -p ${2}
for P in gamma_onSource gamma_cone proton electron
do
for D in North South
do
if [[ ${P} == "gamma_onSource" ]]; then
PP="gamma"
elif [[ ${P} == "gamma_cone" ]]; then
PP="gamma-diffuse"
else
PP=${P}
fi
if [[ ${D} == "North" ]]; then
DD="0deg"
else
DD="180deg"
fi
if [[ -e ${1}/${1}_${PP}_${D}_20deg_DL0.local.list ]]; then
OFILE=${P}_${DD}.list
cp -v -f ${1}/${1}_${PP}_${D}_20deg_DL0.local.list ${2}/${OFILE}
fi
done
rm -f ${2}/${P}.list
touch ${2}/${P}.list
cat ${2}/${P}_*.list >> ${2}/${P}.list
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment