]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
another try to get git straight
authorHadaq@styx <hadaq@styx>
Thu, 12 Dec 2013 15:23:07 +0000 (16:23 +0100)
committerHadaq@styx <hadaq@styx>
Thu, 12 Dec 2013 15:23:07 +0000 (16:23 +0100)
15 files changed:
users/cosy_test/config/cts.sh
users/cosy_test/config/nxyter/nxsetup_0x3800.dat
users/cosy_test/config/nxyter/nxsetup_0x3801.dat
users/cosy_test/config/nxyter/nxsetup_0x3802.dat
users/cosy_test/config/nxyter/nxsetup_0x3803.dat
users/cosy_test/config/nxyter/trb3_setup.sh
users/cosy_test/config/startup.sh
users/cosy_test/evtbuilder_start.sh
users/cosy_test/nxscripts/mode_p.sh
users/cosy_test/nxscripts/quicklook.sh
users/cosy_test/nxscripts/reset.sh
users/cosy_test/nxscripts/set_dacs.sh
users/cosy_test/nxscripts/trig_no.sh
users/cosy_test/trbnet_env_pexor.sh
web/htdocs/tools/scaler.pl

index c6d7b68b28f679dcd1d9fad0d4a6e3881cdc0c14..9d7d137f8ee30d979ae969614ea0a33f4ead7a1d 100755 (executable)
@@ -2,14 +2,18 @@
 
 echo "Doing CTS configuration"
 
-#trbcmd w 0x8000 0xa140 0x000f4240 # pulser freq 100 Hz
-trbcmd w 0x8000 0xa140 0x05f5e0ff # pulser freq 1 Hz
+trbcmd w 0x8000 0xa140 0x000f4240 # pulser freq 100 Hz
+#trbcmd w 0x8000 0xa140 0x05f5e0ff # pulser freq 1 Hz
 trbcmd w 0x8000 0xa141 0x05f5e100  #periodic pulser 1 at 1 Hz for 0xE trigger type
 
 trbcmd loadbit 0x8000 0xa148 0x0f00 0x0e00 # setting trigger type E for second pulser
-trbcmd setbit  0x8000 0xa101 0x6 # turn on periodic pulser 1 and 0
+#trbcmd setbit  0x8000 0xa101 0x6 # turn on periodic pulser 1 and 0
+trbcmd setbit  0x8000 0xa101 0x2 # turn on periodic pulser 0
+#trbcmd setbit  0x8000 0xa101 0x4 # turn on periodic pulser 1
+
+#trbcmd loadbit 0x8000 0xa13d 0x7f 0xa # setting multiplexer input
+trbcmd loadbit 0x8000 0xa13d 0x7f 0xc # nim 1
 
-trbcmd loadbit 0x8000 0xa13d 0x7f 0xa # setting multiplexer input
 trbcmd loadbit 0x8000 0xa13e 0x7f 0xb # setting multiplexer input
 trbcmd loadbit 0x8000 0xa129 0x100 0x100 # setting multiplexer input invert
 
index eeee72c2bbd546993d2e0d451f63caf1ba543dc4..5f421cb391c7afd464c775d47957681619bd5ef5 100644 (file)
 0x00000000    # 15  Channel Masks END
 0x000000a0    # 16  
 0x000000ff    # 17
-0x00000028    # 18  Common Threshold, default 0x80
+0x00000023    # 18  Common Threshold, default 0x80
 0x0000001e    # 19
 0x0000005f    # 20
-0x0000008a    # 21
+0x0000008e    # 21
 0x00000064    # 22
 0x00000089    # 23
 0x000000ff    # 24  Testpulse Strength, default 0x80
@@ -33,8 +33,8 @@
 0x00000045    # 29
 0x000000be    # 30
 0x000000be    # 31
-0x00000004    # 32  TestTrigger setup etc. , default 0x00
-0x00000008    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
+0x00000000    # 32  TestTrigger setup etc. , default 0x00
+0x0000000c    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
 0x000000be    # 34
 0x000000be    # 35
 0x000000be    # 36
index 503ccf31172e21d75d9652229e96df1a95a2e267..24db9e5a0b7f5af8de81472efcf8c2e62fe7c7e6 100644 (file)
@@ -33,8 +33,8 @@
 0x00000045    # 29
 0x000000be    # 30
 0x000000be    # 31
-0x00000000    # 32  TestTrigger setup etc. , default 0x00
-0x0000000c    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
+0x00000004    # 32  TestTrigger setup etc. , default 0x00
+0x00000008    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
 0x000000be    # 34
 0x000000be    # 35
 0x000000be    # 36
index 1afed2b0ddb7ffe3c8655e771b69a9a2c8342c99..3e2d7e61221628eeb831effd2c8436990b1bc0ec 100644 (file)
@@ -19,7 +19,7 @@
 0x00000000    # 15  Channel Masks END
 0x000000a0    # 16  
 0x000000ff    # 17
-0x00000028    # 18  Common Threshold, default 0x80
+0x00000023    # 18  Common Threshold, default 0x80
 0x0000001e    # 19
 0x0000005f    # 20
 0x0000009b    # 21
@@ -33,8 +33,8 @@
 0x00000045    # 29
 0x000000be    # 30
 0x000000be    # 31
-0x00000004    # 32  TestTrigger setup etc. , default 0x00
-0x00000008    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
+0x00000000    # 32  TestTrigger setup etc. , default 0x00
+0x0000000c    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
 0x000000be    # 34
 0x000000be    # 35
 0x000000be    # 36
index f7506a9412859a6b887d71d50e75e22464631ad8..ef4eabc12dc14c71369c9e184b6ae5fbf0445a14 100644 (file)
@@ -22,7 +22,7 @@
 0x00000028    # 18  Common Threshold, default 0x80
 0x0000001e    # 19
 0x0000005f    # 20
-0x000000a8    # 21
+0x000000ae    # 21
 0x00000064    # 22
 0x00000089    # 23
 0x000000ff    # 24  Testpulse Strength, default 0x80
@@ -33,8 +33,8 @@
 0x00000045    # 29
 0x000000be    # 30
 0x000000be    # 31
-0x00000000    # 32  TestTrigger setup etc. , default 0x00
-0x0000000c    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
+0x00000004    # 32  TestTrigger setup etc. , default 0x00
+0x00000008    # 33  clock input 256A, set bit #3, default 0x08 (normal mode)
 0x000000be    # 34
 0x000000be    # 35
 0x000000be    # 36
index 82c3e181e5c35f328add5eb6e8b0522c78783070..32d39f6306f67da3f1a1f6d2a3e01e1ba55cb237 100755 (executable)
@@ -35,13 +35,21 @@ trbcmd rm $board 0x8600 4000 2>/dev/null
 trbcmd w $board 0x8400 0x00   # 0: normal mode 4: no TS Window mode
 trbcmd w $board 0x8401 0      # window  offset 200ns
 #trbcmd w $board 0x8402 250    # window width 800ns
-trbcmd w $board 0x8402 400    # window width 1600ns
-trbcmd w $board 0x8403 125    # CTS-Delay 400ns
+trbcmd w $board 0x8402 100    # window width 1600ns
+trbcmd w $board 0x8403 100    # CTS-Delay 400ns
 
 trbcmd w $board 0x8140 100     # test pulse length 400 ns
 
 # TS sync
-trbcmd w $board 0x850d 8      # reset all counters
+
+#if [[ ${board} -eq 0x3801 ]]; then
+#      trbcmd w $board 0x850d 7;      # ts delay
+#else
+       trbcmd w $board 0x850d 8;      # ts delay
+#fi
+
+# CVT
+trbcmd w $board 0x841a 400      # reset all counters
 
 # Decoder Settings
 trbcmd w $board 0x8120 0      # reset all counters
index cdfe9c3269b8889f11b3bb770f93786c0b528961..f22ae17144ce2e40c7653affe4f73a4ab4c1b381 100755 (executable)
@@ -4,6 +4,11 @@ echo "================================"
 echo "++ Using Daqopserver $DAQOPSERVER."
 
 echo "++ Run Reset"
+
+#pkill trbnetd -SIGUSR1;
+#TRB3_SERVER=trb3069 ~/trbsoft/trbnettools/binlocal/trbcmd reset;
+#pkill trbnetd -SIGUSR2;
+
 trbcmd reset
 
 #Network configuration
index 68534291d0256d9987edc1cf80a29cc08e0a583e..1849f8bc0cf40570685b795658240becebb9d0e5 100755 (executable)
@@ -49,8 +49,14 @@ cd $tmpdir
 
 # source ${HOME}/bin/trbnet_env.sh
 
+#Variants:
+#1 without CTS
+#2 normal mode with everything
+#3 without TRB2
+
 #exec uxterm -bg khaki -geometry 120x19+945+35 -e "/home/hadaq/bin/daq_evtbuild -m 2 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file ${extraopts}; read; bash" &
 exec uxterm -bg khaki -geometry 120x20+900+45 -e "/home/hadaq/bin/daq_evtbuild -m 3 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file ${extraopts}; read ; bash" &
+#exec uxterm -bg khaki -geometry 120x20+900+45 -e "/home/hadaq/bin/daq_evtbuild -m 2 -o ${dest} -x ${pref} -I 1 --ebnum 1 -q 32 -S test -d file ${extraopts}; read ; bash" &
 pid=$!
 echo $pid > $tmpdir/.daq_evtbuild.pid
 
@@ -58,6 +64,7 @@ sleep 1
 
 #exec uxterm -bg tan -geometry 120x19+945+320 -e "/home/hadaq/bin/daq_netmem -m 2 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -q 32 -d 1 -S test ;  " &
 exec uxterm -bg tan -geometry 120x20+900+345 -e "/home/hadaq/bin/daq_netmem -m 3 -i UDP:0.0.0.0:50000 -i UDP:0.0.0.0:50008 -i UDP:0.0.0.0:50009 -q 32 -d 1 -S test ; read ; bash " &
+#exec uxterm -bg tan -geometry 120x20+900+345 -e "/home/hadaq/bin/daq_netmem -m 2 -i UDP:0.0.0.0:50000  -i UDP:0.0.0.0:50009 -q 32 -d 1 -S test ; read ; bash " &
 pid=$!
 echo $pid > $tmpdir/.daq_netmem.pid
 
index 69a575420d79a95c6fe5783496da373a2483963d..9b2dab1881a7b7e65cb459460fd63f792d6ad104 100755 (executable)
@@ -6,5 +6,7 @@
 trbcmd setbit $addr $(( 0x8200 + 32 )) 0x01
 trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x08
 
+trbcmd w $addr 0x8218 0xff
+
 trbcmd w $addr 0x8160 1
 trbcmd w $addr 0x8140 100
index f0e55e1f00f16eaa67e93bd0baba67be3412cc43..9ddf6576d2f172ec651e05ea4ea16ab6b34031ac 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-watch -n 1 \
-trbcmd -d1 r 0xfe49 0x8124; \
-trbcmd -d1 r 0xfe49 0x8125; \
-trbcmd -d1 r 0xfe49 0x8162; \
+watch -n 1 \
+"echo Hit rate [Hz]; trbcmd -D r 0xfe49 0x8124; \
+echo Clocks [Hz]; trbcmd -D r 0xfe49 0x8125; \
+echo Trigger rate [Hz]; trbcmd -D r 0xfe49 0x8162; \
 "
 
index 0d12bed4f056a993447f88d328e94ee065801f6a..8bddc2503818656fa5b5b8d34c24e9dd27ca0ae7 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-[ -n $1 ] && addr=0xfe49 || addr=$1
+[ -z $1 ] && addr=0xfe49 || addr=$1
 
 trbcmd w $addr 0x8100 1
 trbcmd w $addr 0x8101 1
index e61a00a7888f1f8c879a3c39faf68812a2fa8f11..b43770333734ded1594a48209034e2f9e39a359d 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-[ -n $1 ] && addr=0xfe49 || addr=$1
+[ -z $1 ] && addr=0xfe49 || addr=$1
 
 # nx settings
 
index 4002bcd347eaf6f40bc911ac817560f818336b23..4e4ed34e656ce6ffed23c797551269b14a30a3cf 100755 (executable)
@@ -1,18 +1,5 @@
 #!/bin/bash
 
-[ -n $1 ] && addr=0xfe49 || addr=$1
+[ -z $1 ] && addr=0xfe49 || addr=$1
 
-trbcmd w $addr 0x8180 0
-trbcmd w $addr 0x8181 0
-trbcmd w $addr 0x8182 250
-trbcmd w $addr 0x8183 100
-
-trbcmd w $addr 0x8140 0
-#trbcmd w $addr 0x8144 1
-
-trbcmd w $addr 0x8160 0
-trbcmd w $addr 0x8161 0
-#trbcmd w $addr 0x8144 1
-
-trbcmd w $addr 0x8102 1
-trbcmd w $addr 0x8103 0
+trbcmd w $addr 0x8400 0x00
index ea234979b48233c016b87a93efd48de6f406b31c..f66d46324461d694dfe7e38afd101000364cad7e 100755 (executable)
@@ -23,3 +23,10 @@ echo ""
 #PS1=${COLOR_YELLOW}'\u@\h\[\033[01;34m\] \w$(parse_git_branch)'${COLOR_NC}' '
 
 [ -z "$(pidof trbnetd)" ] && /home/hadaq/trbsoft/trbnettools/bin/trbnetd
+
+function treset {
+       pkill trbnetd -SIGUSR1;
+       ~/trbsoft/trbnettools/binlocal/trbcmd reset;
+       pkill trbnetd -SIGUSR2;
+}
+
index 50b67277dedf226315815e989d963ec78f84c6a2..7bd37d8f0968b05229fc67d70252666a0d7adfc8 100755 (executable)
@@ -90,7 +90,7 @@ if($ENV{'QUERY_STRING'} =~ /get/) {
   $delay *= 16.;
   $delay = 1E6 if $delay == 0;
   for(my $i = 0; $i<3; $i++) {
-    $rate->[64+$i] = (($data->{0x8000}->{value}[$i]||0) & 0x00ffffff) - (($olddata->{values}->{0x8000}->{value}[$i]||($data->{0x3820}->{value}[$i]||0)) & 0x00ffffff);
+    $rate->[64+$i] = (($data->{0x8000}->{value}[$i]||0) & 0x00ffffff) - (($olddata->{values}->{0x8000}->{value}[$i]||($data->{0x8000}->{value}[$i]||0)) & 0x00ffffff);
     $rate->[64+$i] += 0x01000000 if ($rate->[64+$i] < 0);
     $rate->[64+$i] = $rate->[64+$i] / ($delay/1E6); 
     }
@@ -114,7 +114,7 @@ if($ENV{'QUERY_STRING'} =~ /get/) {
   $avgsum /= 1-$start;
   print "<div><hr class=\"queryresult\"><table class='queryresult scalers'>";
   $t  = sprintf("<tr><td><b>CTS</b><th>Average<th>Current<th>Ratio");
-  $t .= sprintf("<td rowspan=\"6\"><img height=\"180\" width=\"700\" src=\"scaler.pl?plot%1d%d.%d\">",$j+5,$q,time()/5);
+  $t .= sprintf("<td rowspan=\"6\"><img height=\"180\" width=\"700\" src=\"scaler.pl?plot.%1d.%d.%d\">",5,$p[1],time()/5);
   $t .= sprintf("<tr><td>Sum<td>%d<td>%d<td>",$avgsum,$sum);
   for(my $j=0;$j<2;$j++) {
     my $avgrate = $rate->[$j*2+64];
@@ -152,7 +152,7 @@ elsif($ENV{'QUERY_STRING'} =~ /plot/) {
   my $q = $ENV{'QUERY_STRING'};
 
   my @p = split('\.',$q);
-
+  my $num = $p[1];
   if(-e "/tmp/scalers.$p[2].store") {
     $data = lock_retrieve("/tmp/scalers.$p[2].store");
     }
@@ -194,7 +194,7 @@ else {
 
   my @setup;
   $setup[0]->{name}    = "Scalers";
-  $setup[0]->{cmd}     = "get".$ts;
+  $setup[0]->{cmd}     = "get.".$ts;
   $setup[0]->{period}  = 800;
   $setup[0]->{generic} = 0;