]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
UDP as transport for all possible
authorhadaq <hadaq>
Tue, 4 Nov 2003 16:37:50 +0000 (16:37 +0000)
committerhadaq <hadaq>
Tue, 4 Nov 2003 16:37:50 +0000 (16:37 +0000)
hadaq/hades.tcl

index acd05d10a9a4fd5ea836510b922ed056d7dcb3ff..d3b52f7b55dbbdc2a4b9bd53bfda8add50a8fd05 100644 (file)
@@ -7,9 +7,11 @@ set subSystems { trig shw tof1 tof2 tof3 tof4 rich0 rich1 rich2 mdc0  }
 # the component in the HADES_BASE_DIR
 set beamTime sep03
 
+set prot UDP
+
 # the name of the event builder
 set evtBuilder hadeb03
-set evtBuilderIP 140.181.97.118
+set evtBuilderIp 140.181.97.118
 
 set watermark [expr 32 * 1024]
 set watermark_mdc [expr 16 * 1024]
@@ -25,12 +27,19 @@ set bandwidth(6) 20000
 set trigCPU "r2f-14"
 
 
-if {$evtBuilder == "hadeb01"} {
-       set atmBase 50
-} elseif {$evtBuilder == "hadeb02"} {
-       set atmBase 100
-} elseif {$evtBuilder == "hadeb03"} {
-       set atmBase 150
+if {$prot == "UDP"} {
+       set addr $evtBuilderIp
+       set atmBase 2222
+       set watermark 0
+} else {
+       set addr 0
+       if {$evtBuilder == "hadeb01"} {
+               set atmBase 50
+       } elseif {$evtBuilder == "hadeb02"} {
+               set atmBase 100
+       } elseif {$evtBuilder == "hadeb03"} {
+               set atmBase 150
+       }
 }
 
 group create acquisition
@@ -39,10 +48,8 @@ group create run
 set atmOffset 0
 set vcc [expr $atmBase + $atmOffset]
 agent create $trigCPU hades /hades/usr/hades/$beamTime/trig/hwtrig
-worker create $trigCPU:memnet -a -p -1 -w $bandwidth($atmOffset) -o ATM:0:$vcc
-#worker create $trigCPU:memnet -a -p -1 -w $bandwidth($atmOffset) -o UDP:$evtBuilderIP:2222
+worker create $trigCPU:memnet -a -p -1 -w $bandwidth($atmOffset) -o $prot:$addr:$vcc
 worker create $trigCPU:readout -s trigconc -a -p -2 -w $watermark -v notice
-#worker create $trigCPU:readout -s trigconc -a -p -2 -w 0 -v notice
 group add acquisition $trigCPU:memnet
 group add acquisition $trigCPU:readout
 lappend init $trigCPU:trigconc:init
@@ -55,13 +62,13 @@ lappend trigStop $trigCPU ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./
 lappend ctustart $trigCPU ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./ctustart"
 lappend ctustop $trigCPU ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./ctustop"
 
-lappend inPaths "-i ATM:0:$vcc"
+lappend inPaths "-i $prot:0:$vcc"
 
 if {[lsearch $subSystems rich0] >= 0} {
        set atmOffset 2
        set vcc [expr $atmBase + $atmOffset]
        agent create r2-24 hades /hades/usr/hades/$beamTime/rich/hwrich
-       worker create r2-24:memnet -a -p -2 -w $bandwidth($atmOffset) -o ATM:0:$vcc
+       worker create r2-24:memnet -a -p -2 -w $bandwidth($atmOffset) -o $prot:$addr:$vcc
        worker create r2-24:readout -s rich0 -a -p -1 -w $watermark -v notice
        group add acquisition r2-24:memnet
        group add acquisition r2-24:readout
@@ -69,14 +76,14 @@ if {[lsearch $subSystems rich0] >= 0} {
        lappend reset [ list r2-24 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich0 reset" ]
        lappend start [ list r2-24 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich0 start" ]
        lappend stop [ list r2-24 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich0 stop" ]
-       lappend inPaths "-i ATM:0:$vcc"
+       lappend inPaths "-i $prot:0:$vcc"
 }
 
 if {[lsearch $subSystems rich1] >= 0} {
        set atmOffset 3
        set vcc [expr $atmBase + $atmOffset]
        agent create r2-28 hades /hades/usr/hades/$beamTime/rich/hwrich
-       worker create r2-28:memnet -a -p -2 -w $bandwidth($atmOffset) -o ATM:0:$vcc
+       worker create r2-28:memnet -a -p -2 -w $bandwidth($atmOffset) -o $prot:$addr:$vcc
        worker create r2-28:readout -s rich1 -a -p -1 -w $watermark -v notice
        group add acquisition r2-28:memnet
        group add acquisition r2-28:readout
@@ -84,14 +91,14 @@ if {[lsearch $subSystems rich1] >= 0} {
        lappend reset [ list r2-28 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich1 reset" ]
        lappend start [ list r2-28 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich1 start" ]
        lappend stop [ list r2-28 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich1 stop" ]
-       lappend inPaths "-i ATM:0:$vcc"
+       lappend inPaths "-i $prot:0:$vcc"
 }
 
 if {[lsearch $subSystems rich2] >= 0} {
        set atmOffset 4
        set vcc [expr $atmBase + $atmOffset]
        agent create r2-27 hades /hades/usr/hades/$beamTime/rich/hwrich
-       worker create r2-27:memnet -a -p -2 -w $bandwidth($atmOffset) -o ATM:0:$vcc
+       worker create r2-27:memnet -a -p -2 -w $bandwidth($atmOffset) -o $prot:$addr:$vcc
        worker create r2-27:readout -s rich2 -a -p -1 -w $watermark -v notice
        group add acquisition r2-27:memnet
        group add acquisition r2-27:readout
@@ -99,14 +106,14 @@ if {[lsearch $subSystems rich2] >= 0} {
        lappend reset [ list r2-27 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich2 reset" ]
        lappend start [ list r2-27 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich2 start" ]
        lappend stop [ list r2-27 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./rich2 stop" ]
-       lappend inPaths "-i ATM:0:$vcc"
+       lappend inPaths "-i $prot:0:$vcc"
 }
 
 if {[lsearch $subSystems mdc0] >= 0} {
        set atmOffset 5
        set vcc [expr $atmBase + $atmOffset]
        agent create r2-8  hades /hades/usr/hades/$beamTime/mdc/hwmdc
-       worker create r2-8:memnet -a -p -2 -w $bandwidth($atmOffset) -o ATM:0:$vcc
+       worker create r2-8:memnet -a -p -2 -w $bandwidth($atmOffset) -o $prot:$addr:$vcc
        worker create r2-8:readout -s mdc0  -a -p -1 -w $watermark_mdc -v notice
        group add acquisition r2-8:memnet
        group add acquisition r2-8:readout
@@ -114,14 +121,14 @@ if {[lsearch $subSystems mdc0] >= 0} {
        lappend reset [ list r2-8 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./mdc0 reset" ]
        lappend start [ list r2-8 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./mdc0 start" ]
        lappend stop [ list r2-8 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./mdc0 stop" ]
-       lappend inPaths "-i ATM:0:$vcc"
+       lappend inPaths "-i $prot:0:$vcc"
 }
 
 if {[lsearch $subSystems mdc1] >= 0} {
        set atmOffset 6
        set vcc [expr $atmBase + $atmOffset]
        agent create r2-32  hades /hades/usr/hades/$beamTime/mdc/hwmdc
-       worker create r2-32:memnet -a -p -2 -w $bandwidth($atmOffset) -o ATM:0:$vcc
+       worker create r2-32:memnet -a -p -2 -w $bandwidth($atmOffset) -o $prot:$addr:$vcc
        worker create r2-32:readout -s mdc1  -a -p -1 -w $watermark_mdc -v notice
        group add acquisition r2-32:memnet
        group add acquisition r2-32:readout
@@ -129,14 +136,14 @@ if {[lsearch $subSystems mdc1] >= 0} {
        lappend reset [ list r2-32 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./mdc1 reset" ]
        lappend start [ list r2-32 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./mdc1 start" ]
        lappend stop [ list r2-32 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./mdc1 stop" ]
-       lappend inPaths "-i ATM:0:$vcc"
+       lappend inPaths "-i $prot:0:$vcc"
 }
 
 if {[lsearch $subSystems shw] >= 0} {
        set atmOffset 1
        set vcc [expr $atmBase + $atmOffset]
        agent create r2-29 hades /hades/usr/hades/$beamTime/shw/hwshw
-       worker create r2-29:memnet -a -p -2 -w $bandwidth($atmOffset) -v notice -o ATM:0:$vcc
+       worker create r2-29:memnet -a -p -2 -w $bandwidth($atmOffset) -v notice -o $prot:$addr:$vcc
        worker create r2-29:readout -s show -a -p -1 -w $watermark -v notice
        group add acquisition r2-29:memnet
        group add acquisition r2-29:readout
@@ -144,7 +151,7 @@ if {[lsearch $subSystems shw] >= 0} {
        lappend reset [ list r2-29 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./shw reset" ]
        lappend start [ list r2-29 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./shw start" ]
        lappend stop [ list r2-29 ". \$HOME/.bash_profile;  cd \$HOME/$beamTime/slow; ./shw stop" ]
-       lappend inPaths "-i ATM:0:$vcc"
+       lappend inPaths "-i $prot:0:$vcc"
 }
 
 if {[lsearch $subSystems tof1] >= 0} {