Last change
on this file since 1350 was
1350,
checked in by garnier, 13 years ago
|
update to last version 4.9.4
|
-
Property svn:executable set to
*
|
File size:
1.1 KB
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # $Id: sbt.sh,v 1.2 2008/01/25 17:09:50 ivana Exp $ |
---|
4 | # |
---|
5 | # This script must be run from the top level directory where is SBT installed; |
---|
6 | # it calls the SBT program with the selected geant4 macro in SBT/geant4 directory. |
---|
7 | # The argument has to specify the solid name. |
---|
8 | |
---|
9 | if [ $# -ne 1 ] |
---|
10 | then |
---|
11 | echo |
---|
12 | echo "Usage: sbt.sh solidname" |
---|
13 | echo |
---|
14 | exit 1 |
---|
15 | fi |
---|
16 | |
---|
17 | SOLID=$1 |
---|
18 | INPUT=geant4/${SOLID}.geant4 |
---|
19 | OUTPUT=log/SBT.${SOLID}.out |
---|
20 | LOG=log/SBT.${SOLID}.log |
---|
21 | |
---|
22 | COUNTERR="awk -f script/counterr.awk log/${SOLID}.*.log" |
---|
23 | COUNTVOXELERR="awk -f script/countvoxelerr.awk log/${SOLID}v.*.log" |
---|
24 | |
---|
25 | rm -f ${LOG} |
---|
26 | rm -f ${OUTPUT} |
---|
27 | rm -f tmp.out |
---|
28 | |
---|
29 | # Run the test |
---|
30 | # |
---|
31 | { time SBT < ${INPUT} >& ${LOG}; } >& tmp.out |
---|
32 | |
---|
33 | # Print the time and error statistics |
---|
34 | # |
---|
35 | echo "SBT test for $SOLID" >> ${OUTPUT} |
---|
36 | echo >> ${OUTPUT} |
---|
37 | |
---|
38 | # Run tests |
---|
39 | if [ "`ls log/${SOLID}.*.log 2> /dev/null`" != "" ] |
---|
40 | then |
---|
41 | ${COUNTERR} >> ${OUTPUT} |
---|
42 | else |
---|
43 | echo "No run test output" >> ${OUTPUT} |
---|
44 | fi |
---|
45 | |
---|
46 | # Voxel tests |
---|
47 | if [ "`ls log/${SOLID}v.*.log 2> /dev/null`" != "" ] |
---|
48 | then |
---|
49 | ${COUNTVOXELERR} >> ${OUTPUT} |
---|
50 | else |
---|
51 | echo "No voxel test output" >> ${OUTPUT} |
---|
52 | fi |
---|
53 | |
---|
54 | echo >> ${OUTPUT} |
---|
55 | echo "Time:" >> ${OUTPUT} |
---|
56 | cat tmp.out >> ${OUTPUT} |
---|
57 | rm -f tmp.out |
---|
Note: See
TracBrowser
for help on using the repository browser.