forked from star-bnl/star-sw
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtestGeometry.csh
More file actions
executable file
·50 lines (40 loc) · 1.27 KB
/
testGeometry.csh
File metadata and controls
executable file
·50 lines (40 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /usr/local/bin/tcsh -f
set tag = $1
#if (! $tag) set tag = "y2015a";
set clobber
cat <<EOF > /tmp/test_1.C
{
gROOT->LoadMacro("StarVMC/Geometry/macros/testGeom.C");
testGeom("$tag");
gGeoManager->Export("${tag}_1.C");
}
EOF
root4star -q -b /tmp/test_1.C > /tmp/a.log
sed '/_[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]/d' ${tag}_1.C | sed 's/-0.000000/0.000000/' | sed 's/360.000000/0.000000/' > ${tag}_1
mv .${STAR_HOST_SYS} ${STAR_HOST_SYS}
cat <<EOF > /tmp/test_2.C
{
gROOT->LoadMacro("StarVMC/Geometry/macros/testGeom.C");
testGeom("$tag");
gGeoManager->Export("${tag}_2.C");
}
EOF
root4star -q -b /tmp/test_2.C > /tmp/a.log
sed '/_[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]/d' ${tag}_2.C | sed 's/-0.000000/0.000000/' | sed 's/360.000000/0.000000/' > ${tag}_2
mv ${STAR_HOST_SYS} .${STAR_HOST_SYS}
gvimdiff ${tag}_1 ${tag}_2
#echo "Generate in old library"
#cat <<EOF > b.C
#{
#gROOT->LoadMacro("StarVMC/Geometry/macros/testGeom.C");
#testGeom("$tag");
#gGeoManager->Export("${tag}_2.C");
#}
#EOF
#root4star -q -b b.C > b.log
#sed '/_[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]/d' ${tag}_2.C | sed 's/-0.000000/0.000000/' | sed 's/360.000000/0.000000/' > ${tag}_2
#rm .$STAR_HOST_SYS
#
## Restore
#mv $STAR_HOST_SYS .$STAR_HOST_SYS
#