-
Notifications
You must be signed in to change notification settings - Fork 1
/
STARTRUN.fortis
executable file
·66 lines (46 loc) · 1.81 KB
/
STARTRUN.fortis
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/sh -v
TLUIP=fortis
FORTISIP=fortis
# define which machine the run control is on....
export RCIP=fortis
EUDAQBIN=/opt/eudet/eudaq/bin
XBIN=/usr/bin
export RCPORT=44000
[ "$1" != "" ] && RCPORT=$1
export ROOTSYS=/opt/cern/root
export HOSTNAME=fortis
cd `dirname $0`
printf 'STARTING DAQ\n'
printf '\t Cleaning up first...\n'
killall TestDataCollector.exe
killall TLUProducer.exe
ssh eudet@$TLUIP "killall TLUProducer.exe" &
killall FORTISProducer.exe
killall euLog
killall euRun
sleep 3
printf '\t Making sure all data files are properly writeprotected \n'
chmod a=r data/run*.raw
printf '\033[1;32;48m\t ...Done!\033[0m \n'
printf '\t Making sure TLU is accessible\n'
ssh eudet@$TLUIP "cd eudaq/bin; ./tlunoroot.exe"
sleep 3
printf '\t Starting Subprocesses\n'
cd bin
printf '\t\t RunControl\n'
$EUDAQBIN/euRun -x 0 -y 0 -w 350 -g 450 -a tcp://$RCPORT 2>&1 | tee /tmp/euRun_$$.log &
sleep 3
printf '\t\t Logger\n'
$EUDAQBIN/euLog -x 0 -y 450 -w 350 -g 550 -r tcp://$RCIP:$RCPORT 2>&1 | tee /tmp/euLogger_$$.log&
sleep 3
printf '\t\t DataCollector\n'
$XBIN/xterm -sb -sl 1000 -geom 80x10-500-290 -fn fixed -T "Data Collector" -e "./TestDataCollector.exe -r tcp://$RCIP:$RCPORT 2>&1 | tee /tmp/euData_$$.log" &
sleep 2
printf '\t\t TLU\n'
ssh -X -Y eudet@$TLUIP "(xterm -sb -sl 1000 -geom 80x10-500-160 -T 'TLU Producer' -e 'cd eudaq/bin/; sudo ./TLUProducer.exe -r tcp://$RCIP:$RCPORT')" &
printf '\t\t FORTIS\n'
$XBIN/xterm -sb -sl 1000 -geom 80x40-700-290 -fn fixed -T 'FORTIS Producer' -e " ./FORTISProducer.exe -r tcp://$RCIP:$RCPORT 2>&1 | tee /tmp/euFortis_$$.log" &
#$XBIN/xterm -sb -sl 1000 -geom 80x40-700-290 -fn fixed -T 'FORTIS Producer' -e "gdb ./FORTISProducer.exe 2>&1 | tee /tmp/euFortis_$$.log" &
cd -
printf '\033[1;32;48m\t ...Done!\033[0m \n'
printf '\033[1;32;48mSTART OF DAQ COMPLETE\033[0m \n'