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 # all detectors with default versions only
84 if [ "$DIR" = "ALL_DEFAULT" ]; then
90 #echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
91 test_create_in.sh $DIR -d $VER -g $GEN -v $VIS
97 # loop over all structures with default versions only
98 if [ "$DIR" = "STRUCT_DEFAULT" ]; then
101 for MODULE in `ls`; do
103 #echo "test_create_struct.sh $MODULE v$VER test$GEN$VIS"
104 test_create_struct.sh $MODULE -d $VER -g $GEN -v $VIS
108 # specified detector only
109 if [ -d $SRC/$DIR ]; then
112 until [ "$VER" = "$MAX" ] ; do
113 if [ -f "Ali"$DIR"v"$VER".cxx" ]; then
114 #echo "test_create_in.sh $DIR v$VER test$GEN$VIS"
115 test_create_in.sh $DIR -d $VER -g $GEN -v $VIS