Skip to content

Commit 3abfcd3

Browse files
committed
let user set output prefix
1 parent d0f2ee4 commit 3abfcd3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bin/run-clara

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ info='\nOptions:\n
88
YAML - path to CLARA YAML steering file\n
99
-i input HIPO file or directory of *.hipo files (default=.)\n
1010
-o output directory (default=.)\n
11+
-p output prefix (default=rec_)\n
1112
-c CLARA installation (default=$CLARA_HOME)\n
1213
-t number of threads (default=2)\n
1314
-n number of events (default=-1)\n\n
@@ -62,11 +63,13 @@ set -e
6263
input=.
6364
output=.
6465
threads=2
65-
while getopts i:o:c:t:n:h opt
66+
prefix=rec_
67+
while getopts i:o:p:c:t:n:h opt
6668
do
6769
case $opt in
6870
i) input=$OPTARG ;;
6971
o) output=$OPTARG ;;
72+
p) prefix=$OPTARG ;;
7073
c) CLARA_HOME=$OPTARG ;;
7174
t) threads=$OPTARG && echo $threads | grep -q -E '^[0-9]+$' || error "-t must be an integer, threads" ;;
7275
n) nevents="-e $OPTARG" && echo $nevents | grep -q -E '^-e [0-9]+$' || error "-n must be an integer, events" ;;
@@ -117,14 +120,14 @@ then
117120
unset JAVA_OPTS
118121
$CLARA_HOME/bin/clara-orchestrator \
119122
-F -f ${ip}%${port}_java -s recon \
120-
-i $input -o $output -z rec_ \
123+
-i $input -o $output -z $prefix \
121124
-p $threads -t $threads \
122125
$yaml $CLARA_USER_DATA/filelist.txt
123126
else
124127
$CLARA_HOME/lib/clara/run-clara \
125128
-i $input \
126129
-o $CLARA_USER_DATA \
127-
-z rec_ \
130+
-z $prefix \
128131
-x $CLARA_USER_DATA/log \
129132
-t $threads \
130133
$nevents \

0 commit comments

Comments
 (0)