/
STARTRUN.datura
executable file
·81 lines (70 loc) · 2.74 KB
/
STARTRUN.datura
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/sh
export RCPORT=44000
export HOSTIP=192.168.2.5
export TLUIP=192.168.2.5
[ "$1" != "" ] && RCPORT=$1
#export /opt/products/root/root_v5.26.00
export HOSTNAME=192.168.2.5
cd `dirname $0`
printf '\033[1;32;48m \t STARTING DAQ \033[0m \n'
echo $(date)
printf '\033[22;33m\t Cleaning up first... \033[0m \n'
sh KILLRUN.datura
printf '\033[22;31m\t End of killall \033[0m \n'
sleep 1
######################################################################
printf '\033[22;33m\t Making sure all data files are properly writeprotected \033[0m \n'
chmod a=rw data/run*.raw
printf '\033[22;32m\t ...Done!\033[0m \n'
cd bin
######################################################################
#printf '\033[22;33m\t Making sure TLU is accessible \033[0m \n'
#./tlunoroot.exe
#sleep 1
######################################################################
#=====================================================================
printf '\033[22;33m\t Starting Subprocesses \033[0m \n'
#=====================================================================
######################################################################
# euRun
###############
printf '\033[22;33m\t RunControl \033[0m \n'
./euRun -x 0 -y 0 -w 650 -g 550 -a tcp://$RCPORT &
sleep 1
######################################################################
# euLog
###############
printf '\033[22;33m\t Logger \033[0m \n'
./euLog -x 0 -y 550 -w 1500 -g 450 -r tcp://$HOSTIP:44000 &
sleep 1
######################################################################
# DataCollector
###############
printf '\033[22;33m\t TestDataCollector \033[0m \n'
xterm -sb -sl 1000 -geom 80x10-480-900 -fn fixed -T "Data Collector" -e './TestDataCollector.exe -r tcp://$HOSTIP:$RCPORT' &
sleep 1
######################################################################
# NI Producer
###############
printf '\033[22;33m\t NiProducer for linux \033[0m \n'
xterm -sb -sl 1000 -geom 80x10-480-700 -T 'Ni Producer for Linux' -e './NiProducer.exe -r tcp://$HOSTIP:$RCPORT' &
sleep 1
######################################################################
# TLU producer
###############
printf '\033[22;33m\t TLUProducer \033[0m \n'
xterm -sb -sl 1000 -geom 80x10-480-500 -T 'TLU Producer' -e './TLUProducer.exe -r tcp://$TLUIP:$RCPORT' &
sleep 1
#####################################################################
######################################################################
# Online Monitor
###############
printf '\033[22;33m\t Online Monitor \033[0m \n'
./OnlineMon.exe -sc 10 -s 0 -tc 0 -r tcp://$HOSTIP:$RCPORT &
#sleep 1
#####################################################################
printf ' \n'
printf ' \n'
printf ' \n'
printf '\033[1;32;48m\t ...Done!\033[0m \n'
printf '\033[1;32;48mSTART OF DAQ COMPLETE\033[0m \n'