File indexing completed on 2025-01-30 09:17:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 echo "+ ------------------------------------------------------------------+";
0017
0018 echo "| Starting DDDB plugin executor.... |";
0019
0020 echo "+ ------------------------------------------------------------------+";
0021
0022
0023 if test -z "${DDDB_DIR}"; then
0024 target=/tmp;
0025 if test -n "$USER"; then
0026 target=/tmp/$USER;
0027 fi;
0028 DDDB_DIR=${target}/DDDB;
0029 fi;
0030 export DDDB_DIR;
0031 loader="-loader DDDB_FileReader";
0032 params="-params file:${DDDB_DIR}/Parameters.xml";
0033 input="-input file:${DDDB_DIR}/DDDB/lhcb.xml";
0034 config="";
0035 exec="";
0036 opts="";
0037 vis="";
0038 debug="";
0039 last_cmd="";
0040 plugins="";
0041
0042 all_args="$*";
0043
0044 while [[ "$1" == -* ]]; do
0045
0046 a1=`echo $1 | tr A-Z a-z`;
0047
0048 case ${a1} in
0049 -plugin)
0050 plugins="$*";
0051 while test -n "$1"; do
0052 shift;
0053 done;
0054 ;;
0055 -end-plugin)
0056 plugins="$*";
0057 while test -n "$1"; do
0058 shift;
0059 done;
0060 ;;
0061 -debug)
0062 debug="gdb --args";
0063 last_cmd="";
0064 ;;
0065 -attr)
0066 vis="${vis} -attr $2";
0067 last_cmd="";
0068 shift;
0069 ;;
0070 -visualize)
0071 vis="${vis} -visualize";
0072 last_cmd="";
0073 ;;
0074 -noparams)
0075 params="";
0076 last_cmd="";
0077 ;;
0078 -params)
0079 params="-params $2";
0080 last_cmd="";
0081 shift;
0082 ;;
0083 -loader)
0084 loader="-loader $2";
0085 last_cmd="";
0086 shift;
0087 ;;
0088 -noinput)
0089 input="";
0090 last_cmd="";
0091 ;;
0092 -iov_start)
0093 opts="${opts} -iov_start $2";
0094 shift;
0095 ;;
0096 -iov_end)
0097 opts="${opts} -iov_end $2";
0098 shift;
0099 ;;
0100 -input)
0101 input="-input $2";
0102 last_cmd="";
0103 shift;
0104 ;;
0105 -config)
0106 config="${config} -config $2";
0107 last_cmd="config";
0108 shift;
0109 ;;
0110 -exec)
0111 exec="${exec} -exec $2";
0112 last_cmd="exec";
0113 shift;
0114 ;;
0115 -arg)
0116 if [ "${last_cmd}" = "exec" ]; then
0117 exec="${exec} $2";
0118 elif [ "${last_cmd}" = "config" ]; then
0119 config="${config} $2";
0120 fi;
0121 shift;
0122 ;;
0123 *)
0124 echo "Usage: $0 -arg [-arg]";
0125 exit 13;
0126 ;;
0127 esac
0128 shift;
0129 done;
0130
0131
0132 if [ "$(uname)" == "Darwin" ]; then
0133 export DYLD_LIBRARY_PATH=${DD4HEP_LIBRARY_PATH}
0134 fi
0135 export DD4HEP_TRACE=ON;
0136 ARGS=`echo -plugin DDDB_Executor ${loader} ${params} ${input} ${opts} ${config} ${exec} ${vis} ${plugins}`;
0137 echo "Command: ${debug} `which geoPluginRun` -destroy $ARGS";
0138 if test -z "${debug}";then
0139 exec `which geoPluginRun` -destroy ${ARGS};
0140 else
0141 ${debug} `which geoPluginRun` -destroy ${ARGS};
0142 fi;