2 # ----------------------------------------------------------------
3 # This script generates test macros for all versions of
4 # one detector if it specified or for all detectors otherwise
5 # with specified (or default) test event generator
8 # Usage: test_create.sh detName [-g genNumber] [-v visNumber]
9 # for all detectors: detName = ALL
11 # 5.11.99 I. Hrivnacova
13 # check input parameters
16 echo "test_create.sh detName [-g genNumber] [-v visNumber]"
17 echo " for all detectors: detName = ALL"
26 # get input parameters
37 TO=$AG4_INSTALL/"test"
40 # create destination directory if it does not exist
41 if [ ! -d $TO ] ; then
44 mkdir CASTOR FMD ITS MUON PHOS PMD RICH START STRUCT TOF TPC TRD ZDC
46 mkdir ABSO BODY DIPO FRAME HALL MAG PIPE SHIL
50 if [ "$DIR" = "ALL" ]; then
51 # loop over all detectors if det is not specified
56 until [ "$VER" = "$MAX" ] ; do
57 if [ -f "Ali"$DIR"v"$VER".cxx" ]; then
58 echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
59 test_create_in.sh $DIR -d $VER -g $GEN -v $VIS
68 # loop over all structures
69 if [ "$DIR" = "STRUCT" ]; then
71 for MODULE in `ls`; do
73 until [ "$VER" = "$MAX" ] ; do
74 if [ -f $SRC/$DIR/"Ali"$MODULE"v"$VER".cxx" ]; then
75 echo "test_create_struct.sh $MODULE v$VER test$GEN$VIS"
76 test_create_struct.sh $MODULE -d $VER -g $GEN -v $VIS
83 # specified detector only
84 if [ -d $SRC/$DIR ] ; then
87 until [ "$VER" = "$MAX" ] ; do
88 if [ -f "Ali"$DIR"v"$VER".cxx" ]; then
89 echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
90 test_create_in.sh $DIR -d $VER -g $GEN -v $VIS