]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TPC/scripts/OCDBscan/guiEnv.sh
macro to run on alien
[u/mrichter/AliRoot.git] / TPC / scripts / OCDBscan / guiEnv.sh
1 #
2 # setup aliroot environment
3 # to be modified by users
4 # This is example setup which is used at GSI
5 # In order to use it on your laptop 
6 # AliRoot, Destination directories and the AUTOFILES has to be modified
7 # (Jens Wiechula, Marian Ivanov)
8 #
9 #
10 # parameters
11 # 1  - debug flag
12
13 #
14 # set your aliroot and  alien environment
15 #
16 #source $HOME/.balice64HEAD0108
17 source $HOME/.balice
18 echo YOU HAVE TO MODIFY ALIROOT SETUP
19 echo IT  IS ENVIRNMENT SPECIFIC 
20 #
21 #output directory
22 #
23 export GUI_OUTDIR=/lustre/alice/TPCgui
24 echo YOU HAVE TO MODIFY DESTINATION DIRECTORY
25 echo IT  IS ENVIRONMENT SPECIFIC 
26
27 #usually the next two can stay as they are. If you are not happy with where the output is written
28 #feel free to change them
29 export GUI_OUTDIR_TIME=$GUI_OUTDIR/time
30 export GUI_OUTDIR_RUNS=$GUI_OUTDIR/runs
31
32 #command for batch processing
33 # see also TMPLISTDIR!!!
34 export BATCHCOMMAND="bsub -q alice-t3_8h"
35
36 #directory for the temporary list files
37 #for batch processing this dir needs to be accessable from the batch nodes!!!
38 export TMPLISTDIR=$GUI_OUTDIR/guiTreeLists
39
40 #path to reference tree. Consider to use one!
41 #see README to understand how to create them
42 export REF_DATA_FILE=$GUI_OUTDIR/ref/RefCalPads.root
43 export REF_DATA_TREE=$GUI_OUTDIR/ref/RefTree.root
44
45 #whether alien path is used in OCDB
46 #export WITHALIEN=1
47 export WITHALIEN=0
48
49 #where to look for files in automatic tree creation
50 #it assumes a path to an OCDB directory and uses the
51 #run numbers of the file names:
52 #Run([0-9]{5})_.*
53 export AUTOFILES=/lustre/alice/alien/alice/data/2009/OCDB/TPC/Calib/HighVoltage
54 echo YOU HAVE TO MODIFY AUTOFILES DIRECTORY
55 echo IT  IS ENVIRONMENT SPECIFIC 
56
57 #number of files per chunk in automatic tree creation
58 export NFILES=25
59  
60
61
62 echo Test guiEnv setup
63
64 errorCode=0;
65 goodPass=0;
66 testROOT=`which root`
67 if [ -z testROOT ];  then
68    echo Check root setup"      ":FALSE
69    let errorCode=errorCode+1
70  else
71    echo Check root setup"      ":OK"    "-  $testROOT
72 fi;
73 #
74 # test GUIdir
75 #
76 if [ -d $GUI_OUTDIR ];  then
77    echo Check GUI_OUTDIR"      ":OK"    "-  $GUI_OUTDIR
78   else
79    echo Check GUI_OUTDIR"      ":FALSE"" -  $GUI_OUTDIR
80    let errorCode=errorCode+2
81 fi;
82 #
83 #
84 #
85 if [ -r $GUI_OUTDIR_TIME ];  then
86     echo Check GUI_OUTDIR_TIME" ":OK"    "-  $GUI_OUTDIR_TIME
87   else
88     echo Check GUI_OUTDIR_TIME" ":FALSE" "-  Does not exist or not readable           
89     let errorCode=errorCode+4
90 fi;
91
92 if [ -r $GUI_OUTDIR_RUNS ];  then
93    echo Check GUI_OUTDIR_RUNS" ":OK"    "-  $GUI_OUTDIR_RUNS
94   else
95    echo Check GUI_OUTDIR_RUNS" ":FALSE" "-  Does not exist or not readable           
96    let errorCode=errorCode+8
97 fi;
98
99 if [ -r $GUI_OUTDIR/guiTreeLists ];  then
100    echo Check GUI_OUTDIR/guiTreeLists" ":OK"    "-  $GUI_OUTDIR/guiTreeLists
101   else
102    echo Check GUI_OUTDIR/guiTreeLists" ":FALSE" "-  Does not exist or not readable           
103    let errorCode=errorCode+16
104 fi;
105
106 if [ -z `which aliensh` -a WITHALIEN!=0 ]; then
107    echo Alien not properly initialized
108    let errorCode=errorCode+32
109 fi;
110
111
112 echo $errorCode