forked from eudaq/eudaq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTARTRUN.tlu
More file actions
executable file
·135 lines (114 loc) · 4.48 KB
/
Copy pathSTARTRUN.tlu
File metadata and controls
executable file
·135 lines (114 loc) · 4.48 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
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/bin/bash
export RCPORT=44000
export RCPORT1=44001
export RCPORT2=44444
[ "$1" != "" ] && RCPORT=$1
export HOSTIP=127.0.0.1
export TLUIP=127.0.0.1
export HOSTNAME=127.0.0.1
cd `dirname $0`
export LD_LIBRARY_PATH="`pwd`/bin:$LD_LIBRARY_PATH"
printf '\033[1;32;48m \t STARTING DAQ LOCALLY\033[0m \n'
echo $(date)
printf '\033[22;33m\t Cleaning up first... \033[0m \n'
if [ -f KILLRUN.local ]
then
sh KILLRUN.local
else
sh KILLRUN
fi
printf '\033[22;31m\t End of killall \033[0m \n'
sleep 1
######################################################################
if [ -n "`ls data/run*.raw`" ]
then
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'
fi
#cd bin
#=====================================================================
printf '\033[22;33m\t Starting Subprocesses \033[0m \n'
#=====================================================================
######################################################################
# euRun
###############
printf '\033[22;33m\t RunControl \033[0m \n'
xterm -e "cd bin;./euRun.exe -x 0 -y 0 -w 650 -g 550 -a tcp://$RCPORT" &
sleep 1
######################################################################
# euLog
###############
printf '\033[22;33m\t Logger \033[0m \n'
xterm -e "cd bin;./euLog.exe -x 0 -y 550 -w 1500 -g 450 -r tcp://$HOSTIP:$RCPORT" &
sleep 2
######################################################################
# DataCollector
###############
printf '\033[22;33m\t TestDataCollector \033[0m \n'
#echo xterm -sb -sl 1000 -geom 80x10-480-900 -fn fixed -T "Data Collector" -e "./TestDataCollector.exe -r tcp://$HOSTIP:$RCPORT"
#xterm -sb -sl 1000 -geom 80x10-480-900 -fn fixed -T "Data Collector" -e "./TestDataCollector.exe -r tcp://$HOSTIP:$RCPORT" &
# echo ./TestDataCollector.exe -n NAME1 -r tcp://$HOSTIP:$RCPORT -a tcp://$RCPORT1
xterm -e "cd bin;./TestDataCollector.exe -n TLU -r tcp://$HOSTIP:$RCPORT -a tcp://$RCPORT1" &
sleep 2
#xterm -e "cd bin;./ExampleProducer.exe -n Example1 -r tcp://$HOSTIP:$RCPORT " &
sleep 2
#xterm -e "cd bin;./TestDataCollector.exe -n miniTLU -r tcp://$HOSTIP:$RCPORT -a tcp://$RCPORT2" &
sleep 2
#xterm -e "cd bin;./ExampleProducer.exe -n Example2 -r tcp://$HOSTIP:$RCPORT " &
sleep 2
sleep 2
######################################################################
# NI Producer
###############
if [ -f "bin/NiProducer.exe" ]
then
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 'cd bin;./NiProducer.exe -r tcp://$HOSTIP:$RCPORT' &
sleep 1
else
printf '\033[22;31m\t NiProducer for linux not found! \033[0m \n'
echo 'Configure EUDAQ with the CMake option "-D BUILD_ni=ON" and re-run "make install" to install.'
fi
######################################################################
# miniTLU_ producer
###############
if [ -f "bin/miniTLU_Producer.exe" ]
then
# printf '\033[22;33m\t miniTLU_Producer \033[0m \n'
# xterm -sb -sl 1000 -geom 80x10-480-500 -T 'TLU Producer' -e '. producers/miniTLU/etc/start_minitlu.sh' &
# sleep 1
#else
printf '\033[22;31m\t TLUProducer not found! \033[0m \n'
echo 'Configure EUDAQ with the CMake option "-D BUILD_tlu=ON" and re-run "make install" to install.'
fi
######################################################################
# TLU producer
###############
if [ -f "bin/TLUProducer.exe" ]
then
printf '\033[22;33m\t TLUProducer \033[0m \n'
xterm -sb -sl 1000 -geom 80x10-480-500 -T 'TLU Producer' -e 'cd bin;./TLUProducer.exe -r tcp://$TLUIP:$RCPORT' &
sleep 1
else
printf '\033[22;31m\t TLUProducer not found! \033[0m \n'
echo 'Configure EUDAQ with the CMake option "-D BUILD_tlu=ON" and re-run "make install" to install.'
fi
#####################################################################
######################################################################
# Online Monitor
###############
if [ -f "OnlineMon.exe" ]
then
printf '\033[22;33m\t Online Monitor \033[0m \n'
./OnlineMon.exe -sc 10 -s 0 -tc 0 -r tcp://$HOSTIP:$RCPORT &
else
printf '\033[22;31m\t Online monitor not found! \033[0m \n'
echo 'Configure EUDAQ with the CMake option "-D BUILD_onlinemon=ON" and re-run "make install" to install.'
fi
#####################################################################
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'