Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cta
MonteCarlo
ProdX-Download
Commits
43ab93b7
Commit
43ab93b7
authored
Aug 24, 2020
by
Gernot Maier
Browse files
copy DL1 files from dCache
parent
7bf1f57f
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
43ab93b7
...
...
@@ -109,6 +109,8 @@ proton.list
## Copy DL1 root files to analysis directory
### Downloaded tar files
Use script
*copy_file_lists.sh*
, which requires adjustments at the top:
-
target directory for analysis
...
...
@@ -121,3 +123,12 @@ Use script *copy_file_lists.sh*, which requires adjustments at the top:
Note: will take a while (many files)
### Files from dCache
Use script
*copy_DL1files_from_dCache.sh*
, which requires adjustments at the top (see previous entry for
*copy_file_lists.sh*
).
```
./copy_DL1files_from_dCache.sh
```
copy_DL1files_from_dCache.sh
0 → 100755
View file @
43ab93b7
#!/bin/bash
#
# copy DL1 files from tar in dCache (!!) files to target directory
#
# ./copy_DL1files.sh
#
if
[
$#
-eq
0
]
;
then
echo
"./copy_DL1files.sh copy"
echo
echo
"note the hardwired values"
fi
# hardwired values
DSET
=
"Prod5_LaPalma_AdvancedBaseline_NSB1x"
PLIST
=
"gamma_onSource gamma_cone proton"
PLIST
=
"gamma_onSource gamma_cone proton electron"
# targetdir
OSET
=
"prod5-LaPalma-20deg-v02-LL"
########################
# list of arrays
# South
# declare -a ARRAY=("BL-0LSTs15MSTs50SSTs-MSTF" "BL-0LSTs15MSTs50SSTs-MSTN" "BL-4LSTs25MSTs70SSTs-MSTF" "BL-4LSTs25MSTs70SSTs-MSTN" )
# North
declare
-a
ARRAY
=(
"BL-4LSTs05MSTs-MSTF"
"BL-4LSTs09MSTs-MSTF"
"BL-4LSTs15MSTs-MSTF"
)
for
P
in
$PLIST
do
if
[[
${
P
}
==
*
"gamma_cone"
*
]]
;
then
PP
=
"gamma-diffuse"
elif
[[
${
P
}
==
"gamma_onSource"
]]
;
then
PP
=
"gamma"
elif
[[
${
P
}
==
*
"proton"
*
]]
;
then
PP
=
"proton"
elif
[[
${
P
}
==
*
"electron"
*
]]
;
then
PP
=
"electron"
else
echo
"unknown particle in
$P
"
continue
fi
for
A
in
"
${
ARRAY
[@]
}
"
do
# files are copied here
ODIR
=
${
CTA_USER_DATA_DIR
}
/analysis/AnalysisData/
${
OSET
}
/N.
${
A
}
/
$P
echo
$ODIR
mkdir
-p
${
ODIR
}
for
D
in
North South
do
FLIST
=
${
DSET
}
/
${
DSET
}
_
${
PP
}
_
${
D
}
_20deg_DL1.dCache.list
FF
=
$(
cat
${
FLIST
}
)
for
F
in
$FF
do
echo
$F
${
A
}
dccp
${
F
}
tt.tar.gz
tar
--overwrite
-C
${
ODIR
}
-xvzf
tt.tar.gz
--wildcards
"*
${
A
}
*"
rm
-f
tt.tar.gz
done
done
done
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment