-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cms-2013-collision-datasets-hi: initial implementation
- Loading branch information
1 parent
b243e59
commit 1921edc
Showing
50 changed files
with
269,746 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
================================ | ||
cms-2013-collision-datasets-hi | ||
================================ | ||
|
||
This directory contains helper scripts used to prepare CMS 2013 HI collision | ||
data release. |
38 changes: 38 additions & 0 deletions
38
cms-2013-collision-datasets-hi/code/create-das-json-config-store.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Note: to be run as cernapcms on lxplus8. Example: | ||
# | ||
# cernapcms@lxplus8> mkdir xxx | ||
# cernapcms@lxplus8> cd xxx | ||
# cernapcms@lxplus8> voms-proxy-init --voms cms | ||
# cernapcms@lxplus8> ./create-das-json-config-store.sh | ||
# | ||
# The resulting `*.json` files are to be copied to ../inputs/das-json-config-store/ | ||
# directory on the working laptop. | ||
|
||
# get dataset configuration info | ||
mkdir -p ./inputs/das-json-config-store | ||
while IFS= read -r dataset; do | ||
dataset_result_file=$(echo $dataset | tr '/' '@') | ||
okay=0 | ||
while [ $okay -lt 1 ]; do | ||
echo "==> DAS config dataset=$dataset" | ||
dasgoclient -query "config dataset=$dataset" -json > ./inputs/das-json-config-store/"${dataset_result_file}.json" | ||
if [ $? -eq 0 ]; then | ||
okay=1 | ||
fi | ||
done | ||
done < ./inputs/cms-2013-collision-datasets-hi.txt | ||
|
||
# extract configuration file URLs | ||
rm -f temp_urls | ||
for file in $(ls -1 inputs/das-json-config-store/*.json); do | ||
cat $file | jq -S '.[].config [] | .urls' | grep https >> temp_urls | ||
done | ||
sed -i -e 's,",,g' temp_urls | ||
sed -i -e 's,configFile\,,configFile,g' temp_urls | ||
cat temp_urls | sort -u > urls | ||
|
||
# download configuration files | ||
mkdir -p ./inputs/config-store | ||
cat urls | awk -F/ '{print "curl -o ./inputs/config-store/"$6".configFile -k --key /tmp/x509up_u102955 --cert /tmp/x509up_u102955 " $0}' | bash |
17 changes: 17 additions & 0 deletions
17
cms-2013-collision-datasets-hi/code/create-das-json-store.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Note: to be run as cernapcms on lxplus8. Example: | ||
# | ||
# cernapcms@lxplus031> mkdir xxx | ||
# cernapcms@lxplus031> cd xxx | ||
# cernapcms@lxplus031> voms-proxy-init --voms cms | ||
# cernapcms@lxplus031> ./create-das-json-store.sh | ||
# | ||
# The resulting `*.json` files are to be copied to ../inputs/das-json-store/ | ||
# directory on the working laptop. | ||
|
||
mkdir -p ./inputs/das-json-store | ||
while IFS= read -r dataset; do | ||
dataset_result_file=$(echo $dataset | tr '/' '@') | ||
dasgoclient -query "dataset=$dataset" -json > ./inputs/das-json-store/"${dataset_result_file}.json" | ||
done < ./inputs/cms-2013-collision-datasets-hi.txt |
Oops, something went wrong.