Adding "agent" for jobs management (Marian)
[u/mrichter/AliRoot.git] / TPC / macros / testTPC / agent.sh
1 #!/usr/local/bin/bash
2
3 #aguments
4 #1 working directory
5 # Example usage:
6 # $ALICE_ROOT/TPC/macros/testTPC/agent.sh /afs/cern.ch/user/m/miranov/public/test2008/reckr191xx
7
8
9
10 # Copy the script  to setup aliroot root to the  ~/.bagentsetup
11 # Copy certificates to default place -  ~/.agentauth/
12 # cp /tmp/*$UID* ~/.agentauth/
13 # Set envirnment variables needed OCDB_PATH and INPUTTYPE
14 # CERN SETUP
15
16 export     AGENTINPUTTYPE=2 
17 #use  0-XRD  1-ALIEN  2-CASTOR
18 export     OCDB_PATH=local:///afs/cern.ch/alice/tpctest/OCDB     
19 #
20
21
22
23 #
24 #setup environment
25 #
26 #ALIEN -get token
27 echo xxxxxxxxxxxxxxxxxxxxxxxxx
28 echo xxxxxxxxxxxxxxxxxxxxxxxxx
29 echo xxxxxxxxxxxxxxxxxxxxxxxxx
30 echo ENVIRONMENT
31 echo ALIEN       - $ALIEN
32 echo GSHELL_ROOT - $GSHELL_ROOT
33 echo HOME        - $HOME
34 echo ALIROOT   =`which aliroot` 
35 echo    ROOT   =`which root` 
36 echo xxxxxxxxxxxxxxxxxxxxxxxxx
37 echo xxxxxxxxxxxxxxxxxxxxxxxxx
38 echo xxxxxxxxxxxxxxxxxxxxxxxxx
39 cp ~/.agentauth/*   /tmp/
40 source /tmp/gclient_env_$UID
41 export  PATH=.:${GSHELL_ROOT}/bin:${PATH}.
42
43 #aliensh -c ps
44 #ALIROOT
45 source ~/.bagentsetup
46 echo xxxxxxxxxxxxxxxxxxxxxxxxx
47 echo ENVIRONMENT
48 echo ALIROOT   =`which aliroot` 
49 echo    ROOT   =`which root` 
50 echo xxxxxxxxxxxxxxxxxxxxxxxxx
51
52 #
53 #
54 #
55 echo OPERATING SYSTEM
56 uname -a
57 #export workdir
58 export jobhome=`pwd`
59
60 cd $1
61 aliroot -b -q $ALICE_ROOT/TPC/macros/testTPC/AliTPCjobs.cxx
62
63 #alien_cp -d syswatch.log alien:${alien_HOME}syswatch.log@ALICE::GSI::SE 
64