Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JXRootd.sh
Go to the documentation of this file.
1#!/usr/bin/env zsh
2#
3# \author mdejong
4#
5script=${0##*/}
6
7if [ -z $JPP_DIR ]; then
8 echo "Variable JPP_DIR undefined."
9 exit
10fi
11
12source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
13
14set_variable: DEBUG XROOTD_DEBUG 2
15set_variable: WORKDIR XROOTD_WORKDIR ./
16set_variable: DIR XROOTD_PATH root://ccxroot:1999//hpss/in2p3.fr/group/km3net/data/raw/sea/
17
18if do_usage $*; then
19 usage "$script [path] <detector identifier> <run number>"
20fi
21
22if (( $# < 2 || $# > 3 )); then
23 fatal "Invalid number of arguments."
24fi
25
26set_variable DETECTOR_ID $argv[-2]
27set_variable RUN $argv[-1]
28
29if (( $# == 3 )); then
30 DIR=${DIR/sea/$1}
31fi
32
33set_variable INPUT_FILE $DIR/KM3NeT_${(l:8::0::0:)DETECTOR_ID}/$(($RUN / 1000))/KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}.root
34
35echo $DIR/KM3NeT_${(l:8::0::0:)DETECTOR_ID}/$(($RUN / 1000))/KM3NeT_${(l:8::0::0:)DETECTOR_ID}_${(l:8::0::0:)RUN}.root
36
37xrdcp $INPUT_FILE .
38